You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Windchime <w...@zahuta.com> on 2009/05/05 03:30:12 UTC

appinfo validation

I am building a grammar pool and validating xml instances.  All of this
works well except that the schema 'appinfo' elements are not getting laxly
validated (that is, they don't seem to be validated at all).  I can make
this validate correctly by adding the XML Schema for Schema into the grammar
pool, but this just seems wrong (and takes up a noticeable chunk of CPU)-is
there a better way?

 

Thanks,

 

Windy

 


RE: appinfo validation

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Hi Windy,

You probably also need to set "generate-synthetic-annotations" [1] to true.

Thanks.

[1]
http://xerces.apache.org/xerces2-j/features.html#generate-synthetic-annotations

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

"Windchime" <w...@zahuta.com> wrote on 05/05/2009 02:08:41 PM:

> Michael,
>
> Thanks.  This works great.  However, some (all?) other areas in the
> schema aren?t laxly validated.  For example, a lax attribute on an
> xs:element.  Any suggestions here?
>
>
> From: Michael Glavassevich [mailto:mrglavas@ca.ibm.com]
> Sent: Monday, May 04, 2009 8:46 PM
> To: j-users@xerces.apache.org
> Subject: Re: appinfo validation
>
> Hi Windy,
>
> If you want annotations to be laxly validated when the schema is
> loaded you could try setting the "validate-annotations" feature [1]
> to true. Xerces will use whatever declarations that are available to
> validate their content.
>
> Thanks.
>
> [1] http://xerces.apache.org/xerces2-j/features.html#validate-annotations
>
> Michael Glavassevich
> XML Parser Development
> IBM Toronto Lab
> E-mail: mrglavas@ca.ibm.com
> E-mail: mrglavas@apache.org
>
> "Windchime" <w...@zahuta.com> wrote on 05/04/2009 09:30:12 PM:
>
> > I am building a grammar pool and validating xml instances.  All of
> > this works well except that the schema ?appinfo? elements are not
> > getting laxly validated (that is, they don?t seem to be validated at
> > all).  I can make this validate correctly by adding the XML Schema
> > for Schema into the grammar pool, but this just seems wrong (and
> > takes up a noticeable chunk of CPU)?is there a better way?
> >
> > Thanks,
> >
> > Windy

RE: appinfo validation

Posted by Windchime <w...@zahuta.com>.
Michael,

 

Thanks.  This works great.  However, some (all?) other areas in the schema
aren't laxly validated.  For example, a lax attribute on an xs:element.  Any
suggestions here?

 

  _____  

From: Michael Glavassevich [mailto:mrglavas@ca.ibm.com] 
Sent: Monday, May 04, 2009 8:46 PM
To: j-users@xerces.apache.org
Subject: Re: appinfo validation

 

Hi Windy,

If you want annotations to be laxly validated when the schema is loaded you
could try setting the "validate-annotations" feature [1] to true. Xerces
will use whatever declarations that are available to validate their content.

Thanks.

[1] http://xerces.apache.org/xerces2-j/features.html#validate-annotations

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

"Windchime" <w...@zahuta.com> wrote on 05/04/2009 09:30:12 PM:

> I am building a grammar pool and validating xml instances.  All of 
> this works well except that the schema 'appinfo' elements are not 
> getting laxly validated (that is, they don't seem to be validated at
> all).  I can make this validate correctly by adding the XML Schema 
> for Schema into the grammar pool, but this just seems wrong (and 
> takes up a noticeable chunk of CPU)-is there a better way?
>  
> Thanks,
>  
> Windy


Re: appinfo validation

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Hi Windy,

If you want annotations to be laxly validated when the schema is loaded you
could try setting the "validate-annotations" feature [1] to true. Xerces
will use whatever declarations that are available to validate their
content.

Thanks.

[1] http://xerces.apache.org/xerces2-j/features.html#validate-annotations

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

"Windchime" <w...@zahuta.com> wrote on 05/04/2009 09:30:12 PM:

> I am building a grammar pool and validating xml instances.  All of
> this works well except that the schema ?appinfo? elements are not
> getting laxly validated (that is, they don?t seem to be validated at
> all).  I can make this validate correctly by adding the XML Schema
> for Schema into the grammar pool, but this just seems wrong (and
> takes up a noticeable chunk of CPU)?is there a better way?
>
> Thanks,
>
> Windy