[Mono-list] RelaxNG validation

Travis Staloch twostepted at yahoo.com
Tue Dec 11 23:30:17 EST 2007


Hello,

I'm using Commons.Xml.Relaxng.RelaxngValidatingReader to validate some simple xml documents against relaxng schemas.  When I run the validation I get the exception: Commons.Xml.Relaxng.RelaxngException : Both branches of the interleave contains a text pattern.  This indicates that there is a problem in my relaxng schema.  However, when I do the same validation using Tenuto, it shows that there are no problems with the relaxng schema and that the target xml document validates fine.  

Can anyone tell what the problem might be here or why the RelaxngValidatingReader is giving me this error?  Should tenuto take precedence over RelaxngValidatingReader and does that make this a bug?  My relaxng schema (1) and the lines of source where the exception originates (2) are shown below.

Regards,
 
 -Travis


(1) - Here is my relaxng schema:

<?xml version="1.0" encoding="UTF-8"?>
<element name="config" xmlns="http://relaxng.org/ns/structure/1.0">
  <interleave>
    <optional>
      <element name="database">
        <attribute name="type"><text/></attribute>
        <attribute name="connect_string"><text/></attribute>
      </element>
    </optional>
    <optional>
      <element name="debug_level">
        <text/>
      </element>
    </optional>
    <optional>
      <element name="sources_file">
        <text/>
      </element>
    </optional>
    <optional>
      <element name="test_def_file">
        <text/>
      </element>
    </optional>
    <optional>
      <element name="archive_map_file">
        <text/>
      </element>
    </optional>
    <optional>
      <element name="stat_map_file">
        <text/>
      </element>
    </optional>
    <optional>
      <element name="list_macros_file">
        <text/>
      </element>
    </optional>
    <optional>
      <element name="external_resource_uri">
        <text/>
      </element>
    </optional>
    <optional>
      <element name="log_directory">
        <text/>
      </element>
    </optional>
        <optional>
      <element name="log_xslt">
        <text/>
      </element>
    </optional>
    <optional>
      <element name="max_log_file_size">
        <text/>
      </element>
    </optional>
    <optional>
      <element name="log_flush_count">
        <text/>
      </element>
    </optional>
  </interleave>
</element>


(2) - This is the source of the exception:

Commons.Xml.Relaxng/Commons.Xml.Relaxng.Derivative/RdpPatterns.cs
----------------
internal override void CheckConstraints ()
----------------
// TODO: (1) unique name analysis'
// (2) text/text prohibited 
if (LValue.PatternType == RelaxngPatternType.Text && RValue.PatternType == RelaxngPatternType.Text)
throw new RelaxngException ("Both branches of the interleave contains a text pattern.");



       
---------------------------------
Looking for last minute shopping deals?  Find them fast with Yahoo! Search.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20071211/df048915/attachment.html 


More information about the Mono-list mailing list