Thanks for the fix. I have a related Xpath problem, after two weeks of holiday all is not as obvious as I had hoped. The structure for our XML files holds much of the important imformation in attributes and not as text inside tags. When I use XXE I would like to be able to navigate using a search (ctrl+f) for names held in attributes. According to the wishlist this a restriction, please can you raise this wish to a higher level...
Ciao Graham -----Original Message----- From: Hussein Shafie [mailto:[email protected]] Sent: Thursday, May 27, 2004 5:56 PM To: Heath, Graham Cc: xmleditor-support at xmlmind.com Subject: Re: [XXE] What are valid xpath expressions for schema validation in XXE Heath, Graham wrote: > Greetings, > I am trying to edit an xml file that has an associated xsd schema. > The schema has within it a uniqueness rule, built from an xpath > expression. > > When I use XMLspy to edit the file everything in hunkydory, but XXE > complains that the xpath expression is invalid and will not therefore > load the schema, with the consequent loss of help when adding elements. > > The line in question is as follows (commented out). The uncommented > version works but of course does not "prove" exactly what we need. > <!-- > <xs:selector xpath=".//DataType | > .//ErrorMessages/Group/ErrorClass/* | > .//ErrorMessages/Group/ErrorClass/ErrorDetail/*"/> > --> > <xs:selector xpath=".//DataType"/> > <xs:field xpath="@cname"/> > > The question is this, can we change the XXE validator, improve the > xpath expression or any other ideas? Your xpath expression is fine. Simply remove the spaces before and after '|' and it will work: --- <xs:selector xpath=".//DataType|.//ErrorMessages/Group/ErrorClass/*|.//ErrorMessages/ Group/ErrorClass/ErrorDetail/*"/> --- XXE uses the "Schema for Schemas" (which is normative) as a first pass to validate schemas. And in the *normative* "Schema for Schemas", white spaces are not allowed here. I know, not allowing spaces here seems really stupid (and this is not consistent with the generic XPath spec). I probably forgot to apply some errata. This will be fixed in next release. > Also, where is a button to press that will invoke the validator, is > this possible, or have I overlooked it? XXE is always in validating mode, but if you need extensive diagnostics, you can: * Save the XML document and you'll automatically have the detailed diagnostics. See also Options|Options, Save Tab, "Automatically Show Validity Tool". May be you'll like this option. * OR use Tools|Check Validity (Ctrl+Shift+V) * OR press the small button at the bottom/left of XXE window.

