[Mono-bugs] [Bug 347945] New: RelaxngException : Both branches of the interleave contains a text pattern

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Dec 12 02:25:28 EST 2007


https://bugzilla.novell.com/show_bug.cgi?id=347945


           Summary: RelaxngException : Both branches of the interleave
                    contains a text pattern
           Product: Mono: Class Libraries
           Version: 1.2.5
          Platform: i686
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.XML
        AssignedTo: atsushi at ximian.com
        ReportedBy: twostepted at gmail.com
         QAContact: mono-bugs at ximian.com
          Found By: Third Party Developer/Partner


Description of Problem:
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.  


Steps to reproduce the problem:
1. save the relaxNG schema (1) and xml instance (2) to disk .
2. run the following code:

RelaxngValidatingReader relaxNgRdr = new RelaxngValidatingReader ( new
XmlTextReader (sXmlInstanceFile), new XmlTextReader (sRelaxNGSchemaFile));

while ( !relaxNgRdr.EOF ) 
  relaxNgRdr.Read();



Actual Results:
Commons.Xml.Relaxng.RelaxngException : Both branches of the interleave contains
a text pattern.

Expected Results:
No exception should be thrown according to Tenuto.

How often does this happen? 
Always.

Additional Information:
(1) - 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) Xml Instance
------------------
<?xml version="1.0" encoding="utf-8" ?> 

<config>

  <database type="SqlServer" connect_string="server=; database=; uid=; pwd=;"
/>

  <debug_level>Summaries</debug_level>

  <sources_file>../../config/validation/valid/Sources.xml</sources_file>

  <test_def_file>../../config/validation/valid/Tests.xml</test_def_file>

 
<archive_map_file>../../config/validation/valid/ArchiveMap.xml</archive_map_file>

  <stat_map_file>../../config/validation/valid/StatMap.xml</stat_map_file>

 
<list_macros_file>../../config/validation/valid/ListMacros.xml</list_macros_file>
  <external_resource_uri>file:///home/trav/stats/</external_resource_uri>

  <log_directory>/home/trav/open/SportsFeed/tests/logs</log_directory>

  <log_xslt>XmlLogFile.xslt</log_xslt>

  <max_log_file_size>300</max_log_file_size>

  <log_flush_count>50</log_flush_count>

</config>


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list