Hello,
Elena Litani wrote:
Currently it is not possible to access actual values via any of the API.
Normally, you can access extra XML Schema information via PSVI API (e.g.
normalized value, element type, etc.) [1]**. The PSVI can be accessed
via DOM/SAX in Xerces.
We are thinking to add getActualValue() on the ItemPSVI that would return an object representing actual value. However, currently actual values have Xerces internal representation (in org.apache.xerces.impl.dv.xs classes). Would it be useful to you if we exposed those values? What kind of information would you like to retrieve from these internal representations, e.i. what kind of methods would you like to see?
I have exactly the same problem. After validating my document I would like to be able to access actual values of attributes or elements as their real Java data-type, e.g. I would like to have a way to get a value of type xs:integer as an actual Java Integer object, the same for Date, Double, ...
Therefore the internal data representation is not very useful for that purpose, e.g. I had a look at the XDecimal class and I cannot get from that class a Java Integer object.
Your proposal to expose the validated values in the ItemPSVI classes sounds like a very good idea to me. Perhaps it is possible to extend the internal data representation classes like the XDecimal to return actual Java object representations of the basic types in parallel to extend the ItemPSVI interfaces?
While I am just writing this e-mail I would also like to ask if there is a way to perform partial validation of XML documents? I mean, I have only seen a normalizeDocument() method on the Document class, but what I would like to be able to do is to validate parts of a document below the document root, too. Is there a way to achieve that? Or is this feature perhaps planned for a future release?
Thanks a lot!! -- Christian Schuhegger http://galileo.spaceports.com/~cschuheg
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
