Validating part of a stream

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

Validating part of a stream

by bimargulies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It rather belatedly occurs to me that the whole enterprise of what I'm
trying to do with woodstox validation and a web service may be off.

The 'document' in this case is the entire soap message. We don't have
a schema for all of that. We have a schema for the inside of the body.

So, the code I've written will read along until it reaches that point,
and then set the schema.

It occurs to me that I have no idea what woodstox will do. It
presumably knows that it is not at document top-level, so will it pay
any attention whatsoever to what it sees? Or will it do me a giant
favor and treat the current element as if it were the root?

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

    http://xircles.codehaus.org/manage_email



Re: Validating part of a stream

by Cowtowncoder :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Mar 5, 2009 at 8:26 PM, Benson Margulies <bimargulies@...> wrote:
> It rather belatedly occurs to me that the whole enterprise of what I'm
> trying to do with woodstox validation and a web service may be off.

Let's hope not.. :)

> The 'document' in this case is the entire soap message. We don't have
> a schema for all of that. We have a schema for the inside of the body.
>
> So, the code I've written will read along until it reaches that point,
> and then set the schema.
>
> It occurs to me that I have no idea what woodstox will do. It
> presumably knows that it is not at document top-level, so will it pay
> any attention whatsoever to what it sees? Or will it do me a giant
> favor and treat the current element as if it were the root?

Luckily for you, that's what it indeed should do. However, this has
not been well tested.
The idea however is to allow sub-tree (or fragment event) validation;
just call start & stop validation methods appropriately. Part of the
reason it should work is that neither w3c schema nor dtd really define
what must be root -- as long as element matches one of defined
root-level elements, it should work.

Let us know if and how it works: if there are problems, it should be
possible to resolve them. My main suspicion is around what happens
when the current event is START_ELEMENT; does the current element get
validated or not..

-+ Tatu +-

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

    http://xircles.codehaus.org/manage_email



Re: Validating part of a stream

by bimargulies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Tatu,

Does the state of the msv code concern you? I checked a few things the
other evening.

There is no label in the cvs repository corresponding to the artifacts
in the central maven repositories. There is a source jar for msv/msv,
but not for anything else.

If we're all climbing onto this bus, do we want to take steps to move
to a newer code snapshot that is published consistently?

--benson


On Thu, Mar 5, 2009 at 11:35 PM, Tatu Saloranta <tsaloranta@...> wrote:

> On Thu, Mar 5, 2009 at 8:26 PM, Benson Margulies <bimargulies@...> wrote:
>> It rather belatedly occurs to me that the whole enterprise of what I'm
>> trying to do with woodstox validation and a web service may be off.
>
> Let's hope not.. :)
>
>> The 'document' in this case is the entire soap message. We don't have
>> a schema for all of that. We have a schema for the inside of the body.
>>
>> So, the code I've written will read along until it reaches that point,
>> and then set the schema.
>>
>> It occurs to me that I have no idea what woodstox will do. It
>> presumably knows that it is not at document top-level, so will it pay
>> any attention whatsoever to what it sees? Or will it do me a giant
>> favor and treat the current element as if it were the root?
>
> Luckily for you, that's what it indeed should do. However, this has
> not been well tested.
> The idea however is to allow sub-tree (or fragment event) validation;
> just call start & stop validation methods appropriately. Part of the
> reason it should work is that neither w3c schema nor dtd really define
> what must be root -- as long as element matches one of defined
> root-level elements, it should work.
>
> Let us know if and how it works: if there are problems, it should be
> possible to resolve them. My main suspicion is around what happens
> when the current event is START_ELEMENT; does the current element get
> validated or not..
>
> -+ 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: Validating part of a stream

by Cowtowncoder :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Mar 6, 2009 at 7:09 AM, Benson Margulies <bimargulies@...> wrote:

> Tatu,
>
> Does the state of the msv code concern you? I checked a few things the
> other evening.
>
> There is no label in the cvs repository corresponding to the artifacts
> in the central maven repositories. There is a source jar for msv/msv,
> but not for anything else.
>
> If we're all climbing onto this bus, do we want to take steps to move
> to a newer code snapshot that is published consistently?

Yes, it does concern me. However, AFAIK, MSV is not actively being
published; I have found multiple jars from Maven, none of which is
particularly recent. :-/

Additionally, they are not OSGi bundles. That is why MSV jars that
Woodstox currently bundles are locally built (from cvs head) on demand
(i.e. it's a manual step), and re-packaged to contain OSGi headers.

I would definitely want to improve this process: ideally OSGi-enabled
jars should be deployed to a Maven2 repo. I did send an email to
Kohsuke offering to help with MSV, but haven't gotten a response. I
don't have lots of extra time for that right now either, but it's
certainly on my radar. And I would appreciate any help here obviously.
:)

-+ Tatu +-

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

    http://xircles.codehaus.org/manage_email



Re: Validating part of a stream

by bimargulies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Tatu,

Maybe we want to set up a fork of the source on codehaus? I bet we
can't do that on Apache :-)

If this thing works out in CXF, I might be willing to apply effort to
such a thing.

--benson



On Fri, Mar 6, 2009 at 1:23 PM, Tatu Saloranta <tsaloranta@...> wrote:

> On Fri, Mar 6, 2009 at 7:09 AM, Benson Margulies <bimargulies@...> wrote:
>> Tatu,
>>
>> Does the state of the msv code concern you? I checked a few things the
>> other evening.
>>
>> There is no label in the cvs repository corresponding to the artifacts
>> in the central maven repositories. There is a source jar for msv/msv,
>> but not for anything else.
>>
>> If we're all climbing onto this bus, do we want to take steps to move
>> to a newer code snapshot that is published consistently?
>
> Yes, it does concern me. However, AFAIK, MSV is not actively being
> published; I have found multiple jars from Maven, none of which is
> particularly recent. :-/
>
> Additionally, they are not OSGi bundles. That is why MSV jars that
> Woodstox currently bundles are locally built (from cvs head) on demand
> (i.e. it's a manual step), and re-packaged to contain OSGi headers.
>
> I would definitely want to improve this process: ideally OSGi-enabled
> jars should be deployed to a Maven2 repo. I did send an email to
> Kohsuke offering to help with MSV, but haven't gotten a response. I
> don't have lots of extra time for that right now either, but it's
> certainly on my radar. And I would appreciate any help here obviously.
> :)
>
> -+ 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: Validating part of a stream

by Cowtowncoder :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Mar 6, 2009 at 10:26 AM, Benson Margulies <bimargulies@...> wrote:
> Tatu,
>
> Maybe we want to set up a fork of the source on codehaus? I bet we
> can't do that on Apache :-)
>
> If this thing works out in CXF, I might be willing to apply effort to
> such a thing.

I would rather get a blessing from Kohsuke (the author); and I would
think he would be willing to give access for contributors to improve
MSV project. He's just ultra busy I think. So there shouldn't be need
to fork it, just improve existing project.

-+ Tatu +-

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

    http://xircles.codehaus.org/manage_email



Re: Validating part of a stream

by bimargulies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

To start with, I posted https://msv.dev.java.net/issues/show_bug.cgi?id=16.

I've run into a problem with the MultiSchemaReader which looks to have
been fixed in the three years since maven artifacts were last
published.

On Fri, Mar 6, 2009 at 4:17 PM, Tatu Saloranta <tsaloranta@...> wrote:

> On Fri, Mar 6, 2009 at 10:26 AM, Benson Margulies <bimargulies@...> wrote:
>> Tatu,
>>
>> Maybe we want to set up a fork of the source on codehaus? I bet we
>> can't do that on Apache :-)
>>
>> If this thing works out in CXF, I might be willing to apply effort to
>> such a thing.
>
> I would rather get a blessing from Kohsuke (the author); and I would
> think he would be willing to give access for contributors to improve
> MSV project. He's just ultra busy I think. So there shouldn't be need
> to fork it, just improve existing project.
>
> -+ 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: Validating part of a stream

by Cowtowncoder :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, Mar 7, 2009 at 2:32 PM, Benson Margulies <bimargulies@...> wrote:
> To start with, I posted https://msv.dev.java.net/issues/show_bug.cgi?id=16.

Thanks.

>
> I've run into a problem with the MultiSchemaReader which looks to have
> been fixed in the three years since maven artifacts were last
> published.

Yes, there have been some fixes, including one I found when testing
RNG validation with Woodstox.

-+ Tatu +-

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

    http://xircles.codehaus.org/manage_email



Re: Validating part of a stream

by bimargulies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The 2005 version in the maven repos is hopeless for this purpose. The
required cross-references between the schemas cause it to give up with
a complaint that each of the  schemas is multiply defined.

I'll try the current state, but I can't use it in CXF unless someone
publishes it to maven. I'm getting educated as to whether that's an
Apache option under any circumstance, and meanwhile we have the JIRA.

On Sat, Mar 7, 2009 at 6:11 PM, Tatu Saloranta <tsaloranta@...> wrote:

> On Sat, Mar 7, 2009 at 2:32 PM, Benson Margulies <bimargulies@...> wrote:
>> To start with, I posted https://msv.dev.java.net/issues/show_bug.cgi?id=16.
>
> Thanks.
>
>>
>> I've run into a problem with the MultiSchemaReader which looks to have
>> been fixed in the three years since maven artifacts were last
>> published.
>
> Yes, there have been some fixes, including one I found when testing
> RNG validation with Woodstox.
>
> -+ 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: Validating part of a stream

by Cowtowncoder :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, Mar 8, 2009 at 5:45 AM, Benson Margulies <bimargulies@...> wrote:
> The 2005 version in the maven repos is hopeless for this purpose. The
> required cross-references between the schemas cause it to give up with
> a complaint that each of the  schemas is multiply defined.

I hope I will have time to check the latest version out within a week
(right now I am time-constrained on this). I haven't been using
versions via maven, but even if I was, I'm pretty sure it's easy
enough to install latest version on local maven repo.

-+ Tatu +-

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

    http://xircles.codehaus.org/manage_email



Re: Validating part of a stream

by bimargulies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

For testing, no problem. I can't include a dependency in CXF unless
it's published in the public repo.

On Sun, Mar 8, 2009 at 1:57 PM, Tatu Saloranta <tsaloranta@...> wrote:

> On Sun, Mar 8, 2009 at 5:45 AM, Benson Margulies <bimargulies@...> wrote:
>> The 2005 version in the maven repos is hopeless for this purpose. The
>> required cross-references between the schemas cause it to give up with
>> a complaint that each of the  schemas is multiply defined.
>
> I hope I will have time to check the latest version out within a week
> (right now I am time-constrained on this). I haven't been using
> versions via maven, but even if I was, I'm pretty sure it's easy
> enough to install latest version on local maven repo.
>
> -+ 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: Validating part of a stream

by Cowtowncoder :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, Mar 8, 2009 at 1:27 PM, Benson Margulies <bimargulies@...> wrote:
> For testing, no problem. I can't include a dependency in CXF unless
> it's published in the public repo.

Correct, I understand this. So if multi-file schema can be made to
work, it is imperative to get a more recent MSV version deployed to
Maven. I am sure we can made that happen one way or the other. If
nothing else works, can even just publish msv artifacts under
woodstox' group id (to be used by woodstox itself). While not optimal,
it should be safe and work well for this particular purpose.

-+ Tatu +-

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

    http://xircles.codehaus.org/manage_email



Re: Validating part of a stream

by bimargulies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

See https://msv.dev.java.net/issues/show_bug.cgi?id=18.

This bug is much worse in the 2005 version in the maven repos.



On Sun, Mar 8, 2009 at 10:14 PM, Tatu Saloranta <tsaloranta@...> wrote:

> On Sun, Mar 8, 2009 at 1:27 PM, Benson Margulies <bimargulies@...> wrote:
>> For testing, no problem. I can't include a dependency in CXF unless
>> it's published in the public repo.
>
> Correct, I understand this. So if multi-file schema can be made to
> work, it is imperative to get a more recent MSV version deployed to
> Maven. I am sure we can made that happen one way or the other. If
> nothing else works, can even just publish msv artifacts under
> woodstox' group id (to be used by woodstox itself). While not optimal,
> it should be safe and work well for this particular purpose.
>
> -+ 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: Validating part of a stream

by bimargulies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Bug 18 here blocks reading schemas from wsdls. I suppose that I could
try to filter out the offending import elements, but I'm afraid that
it's turtles all the way down.

To fix this requires dealing with issue 17, and which also requires
checking to see if an include schema is already read before anything
else gets looked for.

On Mon, Mar 9, 2009 at 7:58 AM, Benson Margulies <bimargulies@...> wrote:

> See https://msv.dev.java.net/issues/show_bug.cgi?id=18.
>
> This bug is much worse in the 2005 version in the maven repos.
>
>
>
> On Sun, Mar 8, 2009 at 10:14 PM, Tatu Saloranta <tsaloranta@...> wrote:
>> On Sun, Mar 8, 2009 at 1:27 PM, Benson Margulies <bimargulies@...> wrote:
>>> For testing, no problem. I can't include a dependency in CXF unless
>>> it's published in the public repo.
>>
>> Correct, I understand this. So if multi-file schema can be made to
>> work, it is imperative to get a more recent MSV version deployed to
>> Maven. I am sure we can made that happen one way or the other. If
>> nothing else works, can even just publish msv artifacts under
>> woodstox' group id (to be used by woodstox itself). While not optimal,
>> it should be safe and work well for this particular purpose.
>>
>> -+ 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: Validating part of a stream

by Cowtowncoder :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Mar 9, 2009 at 5:02 AM, Benson Margulies <bimargulies@...> wrote:
> Bug 18 here blocks reading schemas from wsdls. I suppose that I could
> try to filter out the offending import elements, but I'm afraid that
> it's turtles all the way down.
>
> To fix this requires dealing with issue 17, and which also requires
> checking to see if an include schema is already read before anything
> else gets looked for.

Ok. Does not look too good for getting things to work for the specific use case.

Just to make sure: does the multi-input version work for other kinds
of schemas? I assume it does (otherwise it'd be completely useless
feature)

-+ Tatu +-

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

    http://xircles.codehaus.org/manage_email



Re: Validating part of a stream

by bimargulies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In the 2005 version, I don't think so, but I haven't proved it. In the
2008 version, it's possible. I can manually remove the offensive
imports and try.

On Mon, Mar 9, 2009 at 2:29 PM, Tatu Saloranta <tsaloranta@...> wrote:

> On Mon, Mar 9, 2009 at 5:02 AM, Benson Margulies <bimargulies@...> wrote:
>> Bug 18 here blocks reading schemas from wsdls. I suppose that I could
>> try to filter out the offending import elements, but I'm afraid that
>> it's turtles all the way down.
>>
>> To fix this requires dealing with issue 17, and which also requires
>> checking to see if an include schema is already read before anything
>> else gets looked for.
>
> Ok. Does not look too good for getting things to work for the specific use case.
>
> Just to make sure: does the multi-input version work for other kinds
> of schemas? I assume it does (otherwise it'd be completely useless
> feature)
>
> -+ 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: Validating part of a stream

by bimargulies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Tatu,

If there was some way to get the results of my work back out into
artifacts that CXF could consume, I would put some work into fixing
these issues. If K is willing to commit patches and you or he will
post artifacts, great. If you and I can conspire to fork the code at
codehaus, also OK. For now, I guess there's nothing to do but see if
the bugzillas get a response. I'll add a note about willingness to
work.

--benson


On Mon, Mar 9, 2009 at 4:26 PM, Benson Margulies <bimargulies@...> wrote:

> In the 2005 version, I don't think so, but I haven't proved it. In the
> 2008 version, it's possible. I can manually remove the offensive
> imports and try.
>
> On Mon, Mar 9, 2009 at 2:29 PM, Tatu Saloranta <tsaloranta@...> wrote:
>> On Mon, Mar 9, 2009 at 5:02 AM, Benson Margulies <bimargulies@...> wrote:
>>> Bug 18 here blocks reading schemas from wsdls. I suppose that I could
>>> try to filter out the offending import elements, but I'm afraid that
>>> it's turtles all the way down.
>>>
>>> To fix this requires dealing with issue 17, and which also requires
>>> checking to see if an include schema is already read before anything
>>> else gets looked for.
>>
>> Ok. Does not look too good for getting things to work for the specific use case.
>>
>> Just to make sure: does the multi-input version work for other kinds
>> of schemas? I assume it does (otherwise it'd be completely useless
>> feature)
>>
>> -+ 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: Validating part of a stream

by Cowtowncoder :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Mar 9, 2009 at 1:31 PM, Benson Margulies <bimargulies@...> wrote:
> Tatu,
>
> If there was some way to get the results of my work back out into
> artifacts that CXF could consume, I would put some work into fixing
> these issues. If K is willing to commit patches and you or he will
> post artifacts, great. If you and I can conspire to fork the code at
> codehaus, also OK. For now, I guess there's nothing to do but see if
> the bugzillas get a response. I'll add a note about willingness to
> work.

Sounds good. I understand the problem, but I am confident we can get
fixes pushed through one way or the other.
What I mentioned about Codehaus was mostly regarding maven repository
part (where to push), as ideally I would not want to move sources
themselves.
But if necessary, we can temporarily also store sources we need under
another project, woodstox if necessary.

-+ Tatu +-

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

    http://xircles.codehaus.org/manage_email



Re: Validating part of a stream

by bimargulies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm not pushing a fork, really I'm not. But if the very busy only
'committer' of the existing code can't help, something else has to
happen.

I'm also considering as a 'something else' building a brand new
validator as a new feature of XmlSchema, but I'm not sure that I have
the gumption and the time.

On Mon, Mar 9, 2009 at 5:51 PM, Tatu Saloranta <tsaloranta@...> wrote:

> On Mon, Mar 9, 2009 at 1:31 PM, Benson Margulies <bimargulies@...> wrote:
>> Tatu,
>>
>> If there was some way to get the results of my work back out into
>> artifacts that CXF could consume, I would put some work into fixing
>> these issues. If K is willing to commit patches and you or he will
>> post artifacts, great. If you and I can conspire to fork the code at
>> codehaus, also OK. For now, I guess there's nothing to do but see if
>> the bugzillas get a response. I'll add a note about willingness to
>> work.
>
> Sounds good. I understand the problem, but I am confident we can get
> fixes pushed through one way or the other.
> What I mentioned about Codehaus was mostly regarding maven repository
> part (where to push), as ideally I would not want to move sources
> themselves.
> But if necessary, we can temporarily also store sources we need under
> another project, woodstox if necessary.
>
> -+ 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