Default values with grammars 2003-05-28 - By K. Venugopal
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@(protected) >For additional commands, e-mail: xerces-j-user-help@(protected) > > >
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title></title> </head> <body> Hi Ron,<br> <br> Ron Rothblum wrote:<br> <blockquote type="cite" cite="midOFAF808330.9CF69D37-ONC2256D32.003E95EC-C2256D32.003F41C8@(protected) .com"> <pre wrap="">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. </pre> </blockquote> <font color="#3333ff">Does your xml file have "xmlns" pointing to appropriate namespace (i,e does it point to targetNamespace you have defined in<br> your schema .) . <br> </font><br> <br> Regards<br> venu<br> <br> <br> <br> <blockquote type="cite" cite="midOFAF808330.9CF69D37-ONC2256D32.003E95EC-C2256D32.003F41C8@(protected) .com"> <pre wrap="">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): </pre> </blockquote> <br> <blockquote type="cite" cite="midOFAF808330.9CF69D37-ONC2256D32.003E95EC-C2256D32.003F41C8@(protected) .com"> <pre wrap=""> <a class="moz-txt-link-rfc2396E" href="http://xml.org/sax/features/namespaces"> "http://xml.org/sax/features/namespaces"</a>; <a class="moz-txt-link-rfc2396E" href="http://apache.org/xml/features /validation/schema">"http://apache.org/xml/features/validation/schema"</a>; <a class="moz-txt-link-rfc2396E" href="http://apache.org/xml/features /validation/schema-full-checking">"http://apache.org/xml/features/validation /schema-full-checking"</a>; <a class="moz-txt-link-rfc2396E" href="http://xml.org/sax/features/validation"> "http://xml.org/sax/features/validation"</a>; <a class="moz-txt-link-rfc2396E" href="http://apache.org/xml/features /validation/schema/normalized-value">"http://apache.org/xml/features/validation /schema/normalized-value"</a>; <a class="moz-txt-link-rfc2396E" href="http://apache.org/xml/features /validation/schema/element-default">"http://apache.org/xml/features/validation /schema/element-default"</a>; <a class="moz-txt-link-rfc2396E" href="http://apache.org/xml/features/dom/defer -node-expansion">"http://apache.org/xml/features/dom/defer-node-expansion"</a>;
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: <a class="moz-txt-link-abbreviated" href="mailto:xerces -j-user-unsubscribe@(protected)">xerces-j-user-unsubscribe@(protected)</a> For additional commands, e-mail: <a class="moz-txt-link-abbreviated" href= "mailto:xerces-j-user-help@(protected)">xerces-j-user-help@(protected)</a>
</pre> </blockquote> <br> </body> </html>
|
|