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 Ron Rothblum <RO...@il.ibm.com> on 2003/05/26 13:30:56 UTC

Default values with grammars

I have encountered the following problem when loading my schema as a
grammar. I have an xml file which is given as input (with no schema
specified), before parsing it I saved as a grammar a schema to which it
(the xml) should conform. After the parsing, attributes have not received
their default values. I added a reference to the schema in the xml and the
default values were there...

I have the following features for both the preparser (which loads the
schema) and the main parser (for the xml instance):

"http://xml.org/sax/features/namespaces";
"http://apache.org/xml/features/validation/schema";
"http://apache.org/xml/features/validation/schema-full-checking";
"http://xml.org/sax/features/validation";
"http://apache.org/xml/features/validation/schema/normalized-value";
"http://apache.org/xml/features/validation/schema/element-default";
"http://apache.org/xml/features/dom/defer-node-expansion";

Is there some other feature that I need to set or is this just not
supported (if it isn't maybe it should be)?

Thanks,

Ron Rothblum.


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: Default values with grammars

Posted by Ron Rothblum <RO...@il.ibm.com>.
I have xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance with xsi being
the ns for the schema...

Ron Rothblum.


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: Default values with grammars

Posted by "K. Venugopal" <k....@sun.com>.
Hi Ron,

Ron Rothblum wrote:

>I have encountered the following problem when loading my schema as a
>grammar. I have an xml file which is given as input (with no schema
>specified), before parsing it I saved as a grammar a schema to which it
>(the xml) should conform. 
>
Does your xml file have "xmlns" pointing to appropriate namespace (i,e 
does it point to targetNamespace you have defined in
your schema .) .


Regards
venu



>After the parsing, attributes have not received
>their default values. I added a reference to the schema in the xml and the
>default values were there...
>
>I have the following features for both the preparser (which loads the
>schema) and the main parser (for the xml instance):
>  
>

>"http://xml.org/sax/features/namespaces";
>"http://apache.org/xml/features/validation/schema";
>"http://apache.org/xml/features/validation/schema-full-checking";
>"http://xml.org/sax/features/validation";
>"http://apache.org/xml/features/validation/schema/normalized-value";
>"http://apache.org/xml/features/validation/schema/element-default";
>"http://apache.org/xml/features/dom/defer-node-expansion";
>
>Is there some other feature that I need to set or is this just not
>supported (if it isn't maybe it should be)?
>
>Thanks,
>
>Ron Rothblum.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
>For additional commands, e-mail: xerces-j-user-help@xml.apache.org
>
>  
>