Schema support

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

Schema support

by feldari :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello.

I use Woodstox 4.0.3 together with Schema validation. In my Schema I use
for some attributes 'default="something"'. I would have expected that
when parsing one of my files and the attribute on an element is not set
that automatically I receive the default value. But that doesn't work (I
get a null value for that attribute). Doesn't Woodstox (or the
validator, I create it with
XMLValidationSchemaFactory.newInstance(XMLValidationSchema.SCHEMA_ID_W3C_SCHEMA))
support that?
Similar problem with "xs:unique" element in a Schema, it doesn't seem to
be supported.
Is it correct that both things are not supported?

Cheers,
Kai


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Schema support

by Cowtowncoder :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Apr 16, 2009 at 3:59 PM, Kai Schlamp <schlamp@...> wrote:

> Hello.
>
> I use Woodstox 4.0.3 together with Schema validation. In my Schema I use for
> some attributes 'default="something"'. I would have expected that when
> parsing one of my files and the attribute on an element is not set that
> automatically I receive the default value. But that doesn't work (I get a
> null value for that attribute). Doesn't Woodstox (or the validator, I create
> it with
> XMLValidationSchemaFactory.newInstance(XMLValidationSchema.SCHEMA_ID_W3C_SCHEMA))
> support that?
> Similar problem with "xs:unique" element in a Schema, it doesn't seem to be
> supported.
> Is it correct that both things are not supported?

I suspect that attribute value defaulting does not work, given it's
not really validation but PSVI processing. All the hooks do exist in
Woodstox, since DTD processing does this, so it's just matter of
connecting the dots. But this is assuming MSV can do it, which I am
not 100% sure.
You can file an issue for this.

Xs:unique handling I'm not sure about -- I am not w3c schema expert
and I'll have to re-read the definition. But I think that if MSV can
deal with it, it should work.

So -- it is possible that these do not work. But I think both can be
resolved. Having a reproducible test would help a lot. And on positive
side, since usage of schema validation in Woodstox is increasing, more
of the issues can be resolved.

On a related note, Benson from CXF team is working on related issues
with schema validation and MSV: specifically, making it possible to
use multiple schema inputs for validation (to support mix of multiple
namespaces, usually).

-+ Tatu +-

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Schema support

by bimargulies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

And Benson is waiting for Tatu to finish with Jettison and look into
problems he ran into :-)

On Thu, Apr 16, 2009 at 8:18 PM, Tatu Saloranta <tsaloranta@...> wrote:

> On Thu, Apr 16, 2009 at 3:59 PM, Kai Schlamp <schlamp@...> wrote:
>> Hello.
>>
>> I use Woodstox 4.0.3 together with Schema validation. In my Schema I use for
>> some attributes 'default="something"'. I would have expected that when
>> parsing one of my files and the attribute on an element is not set that
>> automatically I receive the default value. But that doesn't work (I get a
>> null value for that attribute). Doesn't Woodstox (or the validator, I create
>> it with
>> XMLValidationSchemaFactory.newInstance(XMLValidationSchema.SCHEMA_ID_W3C_SCHEMA))
>> support that?
>> Similar problem with "xs:unique" element in a Schema, it doesn't seem to be
>> supported.
>> Is it correct that both things are not supported?
>
> I suspect that attribute value defaulting does not work, given it's
> not really validation but PSVI processing. All the hooks do exist in
> Woodstox, since DTD processing does this, so it's just matter of
> connecting the dots. But this is assuming MSV can do it, which I am
> not 100% sure.
> You can file an issue for this.
>
> Xs:unique handling I'm not sure about -- I am not w3c schema expert
> and I'll have to re-read the definition. But I think that if MSV can
> deal with it, it should work.
>
> So -- it is possible that these do not work. But I think both can be
> resolved. Having a reproducible test would help a lot. And on positive
> side, since usage of schema validation in Woodstox is increasing, more
> of the issues can be resolved.
>
> On a related note, Benson from CXF team is working on related issues
> with schema validation and MSV: specifically, making it possible to
> use multiple schema inputs for validation (to support mix of multiple
> namespaces, usually).
>
> -+ Tatu +-
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Schema support

by Cowtowncoder :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Heh. (Jettison -> Jackson, but yet).

Wrt. unique constraint -- I suspect MSV might not handle xpath
portions of that... it does understand them, but code to support it
seems bit thin.
And it's especially hard given event-based handling.

-+ Tatu +-

On Thu, Apr 16, 2009 at 5:21 PM, Benson Margulies <bimargulies@...> wrote:

> And Benson is waiting for Tatu to finish with Jettison and look into
> problems he ran into :-)
>
> On Thu, Apr 16, 2009 at 8:18 PM, Tatu Saloranta <tsaloranta@...> wrote:
>> On Thu, Apr 16, 2009 at 3:59 PM, Kai Schlamp <schlamp@...> wrote:
>>> Hello.
>>>
>>> I use Woodstox 4.0.3 together with Schema validation. In my Schema I use for
>>> some attributes 'default="something"'. I would have expected that when
>>> parsing one of my files and the attribute on an element is not set that
>>> automatically I receive the default value. But that doesn't work (I get a
>>> null value for that attribute). Doesn't Woodstox (or the validator, I create
>>> it with
>>> XMLValidationSchemaFactory.newInstance(XMLValidationSchema.SCHEMA_ID_W3C_SCHEMA))
>>> support that?
>>> Similar problem with "xs:unique" element in a Schema, it doesn't seem to be
>>> supported.
>>> Is it correct that both things are not supported?
>>
>> I suspect that attribute value defaulting does not work, given it's
>> not really validation but PSVI processing. All the hooks do exist in
>> Woodstox, since DTD processing does this, so it's just matter of
>> connecting the dots. But this is assuming MSV can do it, which I am
>> not 100% sure.
>> You can file an issue for this.
>>
>> Xs:unique handling I'm not sure about -- I am not w3c schema expert
>> and I'll have to re-read the definition. But I think that if MSV can
>> deal with it, it should work.
>>
>> So -- it is possible that these do not work. But I think both can be
>> resolved. Having a reproducible test would help a lot. And on positive
>> side, since usage of schema validation in Woodstox is increasing, more
>> of the issues can be resolved.
>>
>> On a related note, Benson from CXF team is working on related issues
>> with schema validation and MSV: specifically, making it possible to
>> use multiple schema inputs for validation (to support mix of multiple
>> namespaces, usually).
>>
>> -+ Tatu +-
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email