 |
 |
 |
<span style='font-size:
10.0pt;font-family:Arial;color:navy'>Sorry, it was a hacked up attempt at a
simple example. I’ll try to take more care with my next submission.<o:p></o:p>
<span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p>
<span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From: Radu Cernuta
[mailto:radu.cernuta@g...]
Sent: Wednesday, February 07, 2007
12:02 PM
To: <st1:PersonName w:st="on">Jeff
Lowery</st1:PersonName>
Cc: noah_mendelsohn@u...;
xml-dev@l...
Subject: Erado UCEI: 4.0 Re:
[xml-dev] RELAX NG equivalent of <xsd:any
processContents="lax">?<o:p></o:p>
<span style='font-size:
12.0pt'><o:p> </o:p>
<span style='font-size:
12.0pt'>I took a better look and you are right, you have also crossed rule 4.6.
But if you try:
Test.rng:<o:p></o:p>
<span style='font-size:
12.0pt'>
<?xml version="1.0"?>
<grammar
xmlns=" http://relaxng.org/ns/structure/1.0"<o:p></o:p>
<span style='font-size:
12.0pt'> ns="
http://foo.org/bar">
<start>
<ref name="children"></ref>
</start><o:p></o:p>
<span style='font-size:
12.0pt'>
<define name="children">
<zeroOrMore>
<element>
<anyName>
<except><o:p></o:p>
<nsName/>
</except>
</anyName>
<ref
name="children"></ref>
</element><o:p></o:p>
</zeroOrMore>
<optional>
<ref
name="interestingElements"></ref>
</optional>
</define>
<define name="interestingElements">
<choice><o:p></o:p>
<externalRef
href=""anythingElseButTest.rng"/><br">
</choice>
</define>
</grammar>
You'll see there are more mistakes in the schema.
<o:p></o:p>
2007/2/7, <st1:PersonName w:st="on">Jeff Lowery</st1:PersonName>
<jlowery@m...>:<o:p></o:p>
<span style='font-size:10.0pt;font-family:
Arial;color:navy'>I'm sure you're correct, however the error I get from Jing is
this:<o:p></o:p>
<span style='font-size:10.0pt;font-family:
Arial;color:navy'> <o:p></o:p>
<span style='font-size:10.0pt;font-family:
Arial;color:navy'>C:\ > java -jar \xml\jing-20030619\bin\jing.jar test.rng<o:p></o:p>
<span style='font-size:10.0pt;font-family:
Arial;color:navy'>C:\ > Test.rng:28:43: error: recursive inclusion of URL
"file:/C:/[…]/Test.rng"<o:p></o:p>
<span style='font-size:
12.0pt'>
I took a better look and you are right, you have also crossed rule 4.6. But if
you try:
Test.rng:<o:p></o:p>
<span style='font-size:
12.0pt'>
<?xml version="1.0"?>
<grammar
xmlns=" http://relaxng.org/ns/structure/1.0"<o:p></o:p>
<span style='font-size:
12.0pt'> ns="http://foo.org/bar">
<start>
<ref name="children"></ref>
</start><o:p></o:p>
<span style='font-size:
12.0pt'>
<define name="children">
<zeroOrMore>
<element>
<anyName>
<except> <o:p></o:p>
<nsName/>
</except>
</anyName>
<ref
name="children"></ref>
</element><o:p></o:p>
</zeroOrMore>
<optional>
<ref
name="interestingElements"></ref>
</optional>
</define>
<define name="interestingElements">
<choice><o:p></o:p>
<span style='font-size:
12.0pt'> <externalRef
href=""anythingElseButTest.rng"/><br">
</choice>
</define>
</grammar>
You'll see there are more mistakes in the schema.
<o:p></o:p>
<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;
margin-left:4.8pt;margin-right:0in'>
<span style='font-size:
12.0pt'><o:p> </o:p>
<span style='font-size:10.0pt;font-family:
Arial;color:navy'>I now wonder: if all patterns are defined inside a containing
grammar, could one except the container from a contained definition? That
way, all definitions would be excluded automatically when new ones were added
to the container. Something I'll try later…<o:p></o:p>
<span style='font-size:
12.0pt'>
I'm not sure I can follow.
Radu Cernuta <o:p></o:p>
<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;
margin-left:4.8pt;margin-right:0in'>
<span style='font-size:
12.0pt'><o:p> </o:p>
<div style='border:none;border-left:solid windowtext 1.5pt;padding:0in 0in 0in 4.0pt;
border-color:-moz-use-text-color -moz-use-text-color -moz-use-text-color blue'>
<span style='font-size:10.0pt;font-family:Tahoma;
font-weight:bold'>From: Radu Cernuta [mailto:radu.cernuta@g...]
Sent: Wednesday, February 07, 2007
1:56 AM
To: <st1:PersonName w:st="on">Jeff
Lowery</st1:PersonName>
Cc: noah_mendelsohn@u...;
xml-dev@l...
Subject: Re:
[xml-dev] RELAX NG equivalent of <xsd:any
processContents="lax">?<o:p></o:p>
<o:p></o:p>
Sorry, I've overlooked the <optional> element.
Rule 4.12 comes first in this case and adds a <group>, then 7.15. The
basic idea stays the same: you cannot have several roots in an XML document.<o:p></o:p>
<span style='font-size:
12.0pt'>
_________________________________________________
Scanned on 07 Feb 2007 20:02:45<o:p></o:p>
|
 | 

|  |
These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.
|  |
| |
 |
 |
 |