I think the XERCES SAX and DOM parsers (you could perhaps use the latter for your DOM validation from your other query?) have some properties that could be of use:

http://xml.org/sax/properties/dom-node (SAX parser) and
http://apache.org/xml/properties/dom/current-element-node (DOM parser).

See http://xml.apache.org/xerces-j/properties.html. Once you've got the node you should be able to determine an XPath for it. You may also need to determine if the error relates to an attribute of that node by interpreting the actual error you get from the parser...

Phil :n)

On Sat, 2004-01-10 at 00:50, Jan Pernica wrote:
Hi everybody

I have XML and XS schema. Let's assume that the validated XML is valid XML
(well formed). But there are XS validation errors like theese
[Error] test.xml:10:25: cvc-pattern-valid: Value '6910018dd093' is not
facet-valid with respect to pattern '[0-9]{9,10}' for type 'RCType'.
[Error] test.xml:10:25: cvc-type.3.1.3: The value '6910018dd093' of element
'rc' is not valid.
[Error] test2.xml:80:44: cvc-attribute.3: The value '9'0'1.01.2003' of
attribute 'datVzniku' on element 'poistenie' is not valid with respect to
its type, 'DatumType'.

The question is: how do I get Xpath to element or attribute with an error?

Thanks for any hints

Regards

Jan Pernica
mailto:[EMAIL PROTECTED]
http://www.pernica.org


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Phil Weighill-Smith <[EMAIL PROTECTED]>
Volantis Systems

Reply via email to