Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Correct use of externalRef sought

Reply
Thread Tools

Correct use of externalRef sought

 
 
Jeff Chimene
Guest
Posts: n/a
 
      05-17-2005
Hi,

(cross-posted on http://www.velocityreviews.com/forums/(E-Mail 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>
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Correct White Balance Doesn't Mean Correct Color?? jim evans Digital Photography 28 12-27-2005 05:10 AM
Opinions Sought: Is this an Appropriate Use Of Code Access Securit Chris Mohan ASP .Net Security 0 07-21-2004 05:58 AM
dunce attempts to use Agnitum Outpost-help sought The Dude Computer Support 5 06-15-2004 11:15 PM
correct or not correct? Dan HTML 7 10-02-2003 10:16 PM
To correct my program. please, check to find errors and correct me. joon Java 1 07-08-2003 06:13 AM



Advertisments