Checking/Reporting on Many Nodes
Noah Genner <[email protected]> Mon, 31 May 2004 09:55:32 -0400
| Newsgroups | gmane.text.xml.schematron |
|---|---|
| Message-ID | <[email protected]> |
Gang, I'm new to Schematron (glad I found it!) and I'm a little stuck. Here's the deal...I have a document that I'm checking that looks like this: <Message> <Product> <REF>1</REF> <AAA>Test1</AAA> <BBB>Test1</BBB> </Product> <Product> <REF>2</REF> <AAA>Test2</AAA> <BBB>Test2</BBB> <CCC>Test2</CCC> </Product> </Message> I'm checking for the presence of some elements, attributes and some data checking and that seems to work fine. However, my document can contain a lot of <Product> nodes (thousands) and when one of checks fails I would like to know which <Product> node had the error. I'm pretty sure I can reference the <REF> element (which is unique) in some manner to give me the 'location' of the error, but I'm stumped as to how to do that. Right now my schema 'tests' the document and gives me a list of errors, but not where those errors are. Any help is appreciated, -- Noah Genner [email protected] http://www.genner.on.ca/noahville/ ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click