Hi,
Ive had a quick look and it seems to be a little bit broken. Look
at the following XML and DTD files
<!DOCTYPE greeting SYSTEM "foo.dtd"><greeting xmlns="foo" ls="ping" />
<!ELEMENT greeting EMPTY>
<!ATTLIST greeting
ls CDATA #IMPLIED
xmlns CDATA #IMPLIED
pointless (yes|no) 'yes'>
selecting the attributes from greeting now returns a null DOMNamedNodeMap.
If you remove the DOCTYPE from the XML you get the expected 2 attributes!
I don't currently have a completely clean tree so if someone could confirm
this then I would appreciate it. I have to go and get drunk now :)
Gareth
On Fri, 20 Sep 2002, Erik Rydgren wrote:
> Hi all!
>
> Thanks for a great product. Although I'm currently having problems.
> We have a HUGE dtd which defines elements with tons of attributes (with
> default values).
> I need to use the default values as we are trying to reduce the actual
> document size by only sending changed values.
> But the catch is that Xerces doesn't work as the documentation says.
>
> -- From the documentation --
>
> const XMLCh * DOMElement::getAttribute ( const XMLCh * name ) const [pure
> virtual]
>
> Retrieves an attribute value by name.
>
> Parameters:
> name The name of the attribute to retrieve.
>
> Returns:
> The DOMAttr value as a string, or the empty string if that attribute does
> not have a specified or default value.
>
> -- End documentation --
>
> According to this I will get the default value if the value is not specified
> in the document, but I don't.
> The default values is not available in the DOMElement. I have even tried to
> find them in DOMElementImpl::fDefaultAttributes (which is not used in the
> standard implementation) but to no luck.
>
> Am I missing something or is this a bug? If it is. How do I fix it? I'll be
> glad to help but I need some direction as I do not have time to grasp the
> whole Xerces source code right now :)
>
> Best regards
> Erik Rydgren
> Mandarin IT
> Sweden
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Gareth Reakes, Head of Product Development
DecisionSoft Ltd. http://www.decisionsoft.com
Office: +44 (0) 1865 203192
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]