[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] Schematron - getting attribute/element values in reports
- From: David <dlee@calldei.com>
- To: xml-dev@lists.xml.org
- Date: Tue, 01 Jun 2010 12:48:47 -0400
Thank you ! dont know how I missed this.
-------------------------
David A. Lee
dlee@calldei.com
http://www.calldei.com
http://www.xmlsh.org
On 6/1/2010 12:37 PM, Philip Fearon wrote:
> The ISO Schematron speficifcation has a<value-of> element for this,
> so I've modified your example below:
>
> <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:<value-of select="@id"/>.</assert>
> </rule>
> </pattern>
>
> --------------
>
> Phil Fearon
> http://qutoric.com
>
> On Tue, Jun 1, 2010 at 5:17 PM, David<dlee@calldei.com> wrote:
>
>> 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
>>
>>
>> _______________________________________________________________________
>>
>> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
>> to support XML implementation and development. To minimize
>> spam in the archives, you must subscribe before posting.
>>
>> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
>> Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
>> subscribe: xml-dev-subscribe@lists.xml.org
>> List archive: http://lists.xml.org/archives/xml-dev/
>> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
>>
>>
>>
> _______________________________________________________________________
>
> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
> to support XML implementation and development. To minimize
> spam in the archives, you must subscribe before posting.
>
> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
> subscribe: xml-dev-subscribe@lists.xml.org
> List archive: http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
>
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]