J
Jeff Chimene
Hi,
(cross-posted on (e-mail address removed))
I'm trying to learn relaxNG. Perhaps some of my design decisions are
overly influenced by older products, and externalRef isn't the correct
choice.
My question is why does jing report "Text not allowed here" and
"Unfinished element" for the following document:
<?xml version="1.0" encoding="UTF-8"?>
<access>
<subscriber>
<id>15</id>
</subscriber>
</access>
Thank-you in advance,
jec
I have a data dictionary with the following structure:
/
/Patterns
/Schemas
I have a schema called Schemas/access.rng
<?xml version="1.0" encoding="UTF-8"?>
<grammar
xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
xmlns:sch="http://www.ascc.net/xml/schematron">
<start>
<choice>
<ref name="access"/>
</choice>
</start>
<define name="access">
<element name="access">
<oneOrMore>
<ref name="Subscriber"/>
</oneOrMore>
</element>
</define>
<define name="Subscriber">
<element name="subscriber">
<element name="id">
<externalRef href="../Patterns/id.rng"/>
</element>
</element>
</define>
</grammar>
id.rng is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<grammar
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
xmlns="http://relaxng.org/ns/structure/1.0"
xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
xmlns:sch="http://www.ascc.net/xml/schematron">
<define name="id">
<element name="id">
<data type="long"/>
</element>
</define>
<start>
<ref name="id"/>
</start>
</grammar>
(cross-posted on (e-mail address removed))
I'm trying to learn relaxNG. Perhaps some of my design decisions are
overly influenced by older products, and externalRef isn't the correct
choice.
My question is why does jing report "Text not allowed here" and
"Unfinished element" for the following document:
<?xml version="1.0" encoding="UTF-8"?>
<access>
<subscriber>
<id>15</id>
</subscriber>
</access>
Thank-you in advance,
jec
I have a data dictionary with the following structure:
/
/Patterns
/Schemas
I have a schema called Schemas/access.rng
<?xml version="1.0" encoding="UTF-8"?>
<grammar
xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
xmlns:sch="http://www.ascc.net/xml/schematron">
<start>
<choice>
<ref name="access"/>
</choice>
</start>
<define name="access">
<element name="access">
<oneOrMore>
<ref name="Subscriber"/>
</oneOrMore>
</element>
</define>
<define name="Subscriber">
<element name="subscriber">
<element name="id">
<externalRef href="../Patterns/id.rng"/>
</element>
</element>
</define>
</grammar>
id.rng is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<grammar
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
xmlns="http://relaxng.org/ns/structure/1.0"
xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
xmlns:sch="http://www.ascc.net/xml/schematron">
<define name="id">
<element name="id">
<data type="long"/>
</element>
</define>
<start>
<ref name="id"/>
</start>
</grammar>