PSVI type information

View: New views
2 Messages — Rating Filter:   Alert me  

PSVI type information

by Windchime :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am trying to get the TypeInfo from an attribute (or element).
Specifically, I want to do "isDerivedFrom(...)"

Generally, I am building a grammar pool, and then doing
"normalize-document()".  This appears to be working well (getting schema
validation errors when appropriate, can getElementById(), default attributes
seem to be set, etc.).

However, the elements and attributes don't seem to be hooked up to the type
information.

I have tried:

typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema", "boolean", 0)
   and
typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema", "boolean",
                       TypeInfo.DERIVATION_EXTENSION |
                       TypeInfo.DERIVATION_RESTRICTION);

I also tried printing out the typeInfo name and namespace (they are null).

Is there some "trick" (feature?) to get the type information available on
the PSVI?  Or can you point me to some example that works?


Thanks much,

Windy


---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@...
For additional commands, e-mail: j-users-help@...


Re: PSVI type information

by Michael Glavassevich-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Windy,

What version of Xerces-J are you using? I fixed a bug [1] in this area for Xerces 2.9.1. What you're trying to do should work now.

Thanks.

[1] http://issues.apache.org/jira/browse/XERCESJ-1235

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@...

E-mail: mrglavas@...

"Windchime" <w@...> wrote on 07/02/2008 07:42:44 PM:

> I am trying to get the TypeInfo from an attribute (or element).
> Specifically, I want to do "isDerivedFrom(...)"
>
> Generally, I am building a grammar pool, and then doing
> "normalize-document()".  This appears to be working well (getting schema
> validation errors when appropriate, can getElementById(), default attributes
> seem to be set, etc.).
>
> However, the elements and attributes don't seem to be hooked up to the type
> information.
>
> I have tried:
>
> typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema", "boolean", 0)
>    and
> typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema", "boolean",
>                        TypeInfo.DERIVATION_EXTENSION |
>                        TypeInfo.DERIVATION_RESTRICTION);
>
> I also tried printing out the typeInfo name and namespace (they are null).
>
> Is there some "trick" (feature?) to get the type information available on
> the PSVI?  Or can you point me to some example that works?
>
>
> Thanks much,
>
> Windy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@...
> For additional commands, e-mail: j-users-help@...