-----Original Message-----
From: Daniel Veillard [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 06, 2008 21:37
To: murali
Cc: [email protected]
Subject: Re: [xml] Querry regarding xmlParserOption.

 

On Tue, Feb 05, 2008 at 05:46:54PM +0530, murali wrote:

>> > indirectly and you get a warning but not really related to parsing.

>> Sometime

>> > this can be fixed, sometime it's hard because the APIs don't let the

>> option

>> > go though. So without more data it's basically impossible to answer.

>> 

>> >Daniel

>> 

>> Find the scenario below.

>> options = 0;

>> options |= (XML_PARSE_NOENT);

>> options |= (XML_PARSE_NONET);

>> options |= (XML_PARSE_NOBLANKS);

>> options |= (XML_PARSE_DTDLOAD);

>> options |= (XML_PARSE_DTDATTR);

>> options |= (XML_PARSE_NOWARNING);  

>> ParserCtxt  = xmlCreateMemoryParserCtxt(DocBuffer, DocBufferSize);

>> xmlDetectSAX2Extn(ParserCtxt);

>> xmlCtxtUseOptions(ParserCtxt,options);

>> xmlParseDocument(ParserCtxt);

>> 

>> if I parse the document which will generate warning, then I get worning
even

>> though I have set the option XML_PARSE_NOWARNING.

>> Hope this will answer your question regarding usage scenario.

 

 > No. This doesn't tell me how you got the warning, what part of libxml2

>sent it. If you had a warning emitted say from the Catalog processing part

>this won't be connected to the options set in the parser context and 

>will be reported anyway. I can't tell from your report if it's a simple

>fixeable bug or due to a side effect of parsing.

 

>Daniel

Hi,

Please find the attached document used to generate a warning.

Regards,

murali

-- 

Red Hat Virtualization group http://redhat.com/virtualization/

Daniel Veillard      | virtualization library  http://libvirt.org/

[EMAIL PROTECTED]  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/

http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/

<!DOCTYPE doc
[
<!ELEMENT doc (#PCDATA|a|b|c|d)*>
<!ELEMENT a EMPTY>
<!ELEMENT b EMPTY>
<!ELEMENT c EMPTY>
<!ELEMENT d EMPTY>
<!ATTLIST a>
<!ATTLIST b >
<!ATTLIST c att CDATA #IMPLIED>
<!ATTLIST d att CDATA #IMPLIED>
<!ATTLIST
c att CDATA
 #IMPLIED
att2
 CDATA
 "second declaration is OK"
att2 CDATA
 #REQUIRED
 >
<!ATTLIST d>
]>
<doc><c/><c att2="test"/></doc>
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to