Validate XPATH expressions of errourneous XML

Are you missing a feature? Request it's implementation here.
mariomueller
Posts: 30
Joined: Wed Feb 14, 2018 3:27 pm

Validate XPATH expressions of errourneous XML

Post by mariomueller » Wed Nov 07, 2018 9:11 am

Hi,

if a XML is assigned to a XSD and the XML is not valid, it is not possible to check XPATH expressions in the "XPath/XQuery Baumeister".
Let's asume the following case.

You got an expression in the XSD like

Code: Select all

<xsd:assert test="(sum(Z11/S_QTY/C_C186/D_6060 | Z12/S_QTY/C_C186/D_6060 | Z13/S_QTY/C_C186/D_6060 | Z14/S_QTY/C_C186/D_6060 ) = '100') "/>
where you want to check if the sum of this four nodes = 100.
Now let's asmuse you are validating a XML and you get an validation error; but you expected there is NO validation error.
So you have to evaludate some XPATH expressions to find the single nodes (and their values) which are validated in the XSD assert.
But this XPATH evaluation is not possible.

Would you please change this?

Thanks
Regards
Mario

tavy
Posts: 181
Joined: Thu Jul 01, 2004 12:29 pm

Re: Validate XPATH expressions of errourneous XML

Post by tavy » Fri Nov 09, 2018 9:51 am

Hello Mario,

If the XML document is well-formed you should be able to execute an XPath expression. The schema validation errors should not affect the XPath execution.
Can you tell me what is the XPath expression that you want to execute and what is the error that you obtain when you execute it?
Also, it will be easier if you could send (to support at oxygenxml dot com) some sample file to reproduce the problem.

Best Regards,
Octavian
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply