Michael, Thank you for your lightning response.
I was able to cast my jaxp Validator object as a PSVIProvider, in theory giving me access to the getElementPSVI() methods to find the value of validationAttempted, as you've suggested. However, getElementPSVI() returns a null, I presume since it is only valid within the start/end of the element, and I am simply using: ... Schema schema = schemaFactory.newSchema(schemaSource); Validator validator = schema.newValidator(); validator.validate(streamSource); and so no longer have a context for getElementPSVI(). Any idea how do I could return a valid ElementPSVI? Thanks again for your help... Regards, Kris Michael Glavassevich wrote: > > kris2006 <[EMAIL PROTECTED]> wrote on 12/07/2006 12:28:21 AM: > >> I am looking for the set of valid Features for the Xerces implementation > of >> the JAXP Validator class. The Features described in >> http://xerces.apache.org/xerces2-j/features.html pertain to > DocumentBuilder >> and SAXParser. > > That's been on my TODO list for awhile. Just haven't been finding the time > to write it up. > >> I have tried using one of the general features listed there >> (http://apache.org/xml/features/validation/warn-on-undeclared-elemdef) > but >> it is not recognised for either Validator or SchemaFactory classes. > > That feature only applies to DTDs. It warns [1] you when the content model > of an element declaration references an element which has not been > declared in the DTD. > >> In particular I would like to validate a soap envelope that contains a > xml >> string as its body - using both the SOAP-ENV schema and the relevant > schema >> of the enveloped xml. This works, but if the wrong schema is specified > for >> the enveloped xml the soap still validates! I think the feature > mentioned >> above would warn if the schema was incorrect and so would solve my > problem. >> Any other suggestions appreciated... > > You should examine the PSVI [2] if you want to check the degree [3] to > which the SOAP message was validated. > >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] > > [1] http://www.w3.org/TR/2006/REC-xml-20060816/#elemdecls > [2] http://xerces.apache.org/xerces2-j/faq-xs.html#faq-8 > [3] > http://www.w3.org/Submission/2004/SUBM-xmlschema-api-20040309/xml-schema-api.html#ItemPSVI-validationAttempted > > > Michael Glavassevich > XML Parser Development > IBM Toronto Lab > E-mail: [EMAIL PROTECTED] > E-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Validator-features-tf2772590.html#a7824915 Sent from the Xerces - J - Dev mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
