OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

relax-ng-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: Re: [relax-ng-comment] help with validating IDREFs


Hi Robert,

>Let's say I have a source XML like:
>
><article>
>  <p>This is a link to a different <link page-idref="p123456">page</link>. This
>is a link to a different <link content-idref="c12345">content piece</link>.</p>
></article>
>
>- I keep a project/site structure that has the pages (and folders) identified in
>one XML config file.
>--- The folders and pages can include individual content pieces one or more
>times.
>- I keep the content pieces identified in another XML config file.
>
>Is there some way to validate the content piece's IDREFs against the two
>separate config files?
>
As already mentioned on this list the IDREFs functionality only applies 
within a single XML document. Like most other XML Schema languages 
RELAX-NG doesn't include functionality to check this constraint. 
However, if you have the option to embedd Schematron rules in your 
RELAX-NG schema you can perform simple checks between documents as well 
as within documents.
See [1] for more information about embedding Schematron in RELAX-NG and 
see [2] for an example of how to check basic constraints between 
documents. Note that in this case you must use an XSLT implementation of 
Schematron since constraints between XML documents use XSLT's document() 
function. Some implementations of Schematron are only XPath based and 
hence doesn't support this.

Cheers,
/Eddie

[1] http://www.topologi.com/public/Schtrn_XSD/Paper.html
[2] http://www.topologi.com/public/Schtrn_XSD/Paper.html#3Dependancy

>
>Thanks again for your help,
>-Rob
>
>p.s. Is there a better place to ask these basic questions?
>
>
>
>----------------------------------------------------------------
>To subscribe or unsubscribe from this elist use the subscription
>manager: <http://lists.oasis-open.org/ob/adm.pl>
>  
>



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC