external id references

S

srikantkt

I am working with a schema that uses xsd:ID to tag certain elements.
The corresponding elements that reference these elements use xsd:IDREF.
Now, this works as long as the ID is defined in the same document,
otherwise schema validation fails.
Is there any way for elements in one xml document reference elements in
another
For a trivial example, consider a document called "app.xml"

<properties name="ID001">
<property>
<name>foo</name>
<value>111</value>
</property>
<property>
<name>bar</name>
<value>222</value>
</property>
</properties>
<appContext>
<propertyRef id="ID001"/>
</appContext>

If all <properties> were externalized into a separate xml document (say
"props.xml") and the original "app.xml" is reduced to

<appContext>
<propertyRef id="ID001"/>
</appContext>

URI references is one option but assume they cannot be used, is there
any way to have a xml schema such that the above xml snippet is valid?
Is there any other way of tagging the id reference, say
<propertyRef id="props.xml#ID001"/> ?

thanks,
Srikant
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,265
Latest member
TodLarocca

Latest Threads

Top