[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Schematron - getting attribute/element values in reports

  • From: David <dlee@calldei.com>
  • To: xml-dev@lists.xml.org
  • Date: Tue, 01 Jun 2010 12:17:09 -0400

Schematron - getting attribute/element values in reports
I'm looking at schematron to do validation of XML documents in an XML 
based messaging protocol.
One thing I would like to do is to extract the *value* of a failing 
attribute or node.
I found the <name> element and it works fine at extracting the name of 
nodes (elements or attributes) but nothing to get the value.

E.g. suppose I have an offending fragment

<message id="1234"> ... some message </message>


And a schematron rule like


<pattern name="Must have good messages">
<rule context="message">
<assert test="xs:integer(@id) lt 100">Messages must be smaller then 100, 
your message ID was: {WHAT DO I PUT HERE?} </assert>
</rule>
</pattern>




Is there any way to do "{WHAT DO I PUT HERE?}" ?

I'd like to put "1234"  there ... but cant find a way using schematron.

Thanks for any suggestions.



-- 
-------------------------
David A. Lee
dlee@calldei.com
http://www.calldei.com
http://www.xmlsh.org



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


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.