Novice here, but how about setting a constant when the wrapper Object is created such that one can call a function and get an integer constant which represents the data type. For example

public static final int DOUBLE = 0, INT = 1, BOOLEAN = 2 ... etc;
protected int validatedValueType = -1;

public int getValidatedValueType() throws ...{
        if(validatedValueType == -1){
                throw new some_NotInitiatedException();
        }
        return validatedValueType
}

The value of validatedValueType is set when the Object representing the actual ValidatedValue is set.

Just a thought.
--
Geoff Granum
[EMAIL PROTECTED]
Aeronautical & Astronautical Engineering,
Purdue University
West Lafayette, Indiana

On Tue, 21 Oct 2003 17:29:18 -0400, Elena Litani <[EMAIL PROTECTED]> wrote:

Hi Christian,

Thank you for your reply.

Christian Schuhegger wrote:

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?

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?

There are couple of alternative solutions, so if you want to discuss it
lets do it on the xerces-j-dev mailing list.


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.


Thank you,




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



Reply via email to