Re: [xml] ATTRIBUTE NAME validation problem



On Mon, Jan 28, 2008 at 06:03:15PM +0530, murali wrote:

   Hi,


   W3c XML standard specifies that.

Attribute-list Declaration is:

   [52]

   AttlistDecl

      ::=

   '<!ATTLIST' S Name AttDef* S? '>'

   [53]

   AttDef

      ::=

   S Name S AttType S DefaultDecl

   And

   [5]   Name   ::=   (Letter | '_' | ':') (NameChar)*


    According to above productions,

   <!ATTLIST doc : CDATA #IMPLIED>

   is a valid declaration of attribute ":" for element doc.

   But , currently LIBXML2 generates a error when it encounters this.

  Error which one ? i could not reproduce this:

wei:~/XML -> ./xmllint --valid tst.xml 
<?xml version="1.0"?>
<!DOCTYPE foo [
<!ELEMENT foo EMPTY>
<!ATTLIST foo : CDATA #IMPLIED>
]>
<foo/>
wei:~/XML ->

   Java xml parser also has the same behavior.

   Is  this  the correct behavior?. According to standard the behavior is
   incorrect.

This could be a normal behaviour, not for XML 1.0 parsing but for the Namespace
in XML support which happen to use ':' as the separator between the namespace
prefix and the namespace local name. See
  http://www.w3.org/TR/REC-xml-names/#ns-qualnames
but I don't see the problem myself

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]