[Schematron] Testing Text
VAN DE WATER, Peter
peter_van_de_water at vero.co.nz
Wed Jan 7 14:06:11 EST 2009
If only 'aff' can contain text then using a context of 'aff' rather than '*' will restrict the test to where you want it.
Pete
-----Original Message-----
From: schematron-bounces at eccnet.com [mailto:schematron-bounces at eccnet.com] On Behalf Of Ganesh Babu N
Sent: 08 January 2009 12:15 AM
To: SVRL
Subject: [Schematron] Testing Text
Dear All,
I am writing a schematron which will check for the content in the XML
file using the below rule.
XML:
<article>
<fm>
<au>
<aff>testing @ test</aff>
</au>
<fm>
</article>
Schematron:
<rule context="*">
<assert test="not(contains(.,'@')">@ found in "<name/>"</assert>
</rule>
I am getting 4 errors with all the above elements. error at <article>,
error at <fm>, error at <au> and error at <aff>. But actually the
error is at <aff> only. How to get only one error message at <aff>
I have tried *[descendant::*][last()] and other ways but unable to get
the result.
**********************************************************************
CAUTION - This message is intended for the addressee named above. It may contain privileged or confidential information.
If you are not the intended recipient of this message you must:
- Not use, copy, distribute or disclose it to anyone other than the addressee;
- Notify the sender via return email; and
- Delete the message (and any related attachments) from your computer immediately.
Internet emails are not necessarily secure. Vero Insurance New Zealand Limited (Vero), and its related entities, do not accept responsibility for changes made to this message after it was sent.
Unless otherwise stated, views expressed within this email are the author's own and do not represent those of Vero.
If you do not wish to receive any more emails from this person or Vero please respond to this email with the word "unsubscribe" in the subject field.
**********************************************************************
More information about the Schematron
mailing list