Re: difference between these 2 rules...
Pedro Salazar <[email protected]> 03 Mar 2004 15:43:20 +0000
| Newsgroups | gmane.text.xml.schematron |
|---|---|
| Message-ID | <[email protected]> |
No, your rule is looking for a D/@index without matching V/@targetIndex. > That means if you add <V targetIndex="2" /> then your assertions will > be true (despite the targetIndex="3" that is still there). > > So you should have a > <rule context="V"> > <assert test="@targetIndex = ..../D/@index"> > > (and "...." is your path to the D element) You really have clarified the differences of both rules but more than that you have identified the correct approach for achieving my purpose. > However, why don't you use the ID/IDREF mechanism? I never used the ID/IDREF on schemas, I rather use the key/unique elements of schema. Can I mix ID/IDREF with key/unique? However my ID/IDREF knowledge is limited, and I choose the key/unique rules because I'm not aware of the flexibility of ID/IDREF when I may apply constraints based on attribute's values. Until now, the schematron is being fantastic because all my semantic constraints are being done over the schema which allows the stability and simplicity of my schema. thank you very much, regards, Pedro Salazar. -- -PS ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click