Hi Elena,

I believe the ItemPSVI interface should have only one method that
returns an Object representing the actual value. Given that, you will
need to have bunch of instanceof checks in your code to be able to cast
to the internal Xerces representation, i.e. XDecimal, and then get a
Java decimal (a method could be defined on XDecimal). Are you fine with
this solution?

I think it is not enough to just return the actual Java object, because when I use in my document an Integer with min/max constraints then in effect I have a domain type that restricts its valid values to a subset of what the underlying base type would allow. At some place I would like to be able to find out to which domain type the value I got belongs to.


I would imagine to get from ItemPSVI something like a "TypedValue" (i don't care about the name of that class) object where there is a method to get the host language value plus a method to be able to find out more about the domain of that value, e.g.:

public interface TypedValue {
        public Object           getHostLanguageValue();
        public XSTypeDefinition getTypeDefinition();
}

With that approach somebody who is not interested in the domain type does not need to have a casting cascade, he just gets the host language value and continues to work with that value.

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?


See email below.

Thanks for that info!


Have a nice day,
--
Christian Schuhegger
http://galileo.spaceports.com/~cschuheg



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to