[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-c-dev
Subject:    RE: Announcing revision 'a' of Xerces-C 1.2.0.
From:       "Peter Murphy" <peterm () fast ! fujitsu ! com ! au>
Date:       2000-06-27 5:45:05
[Download RAW message or body]

> -----Original Message-----
> From: Rahul Jain [mailto:rahul@jtcsv.com]
> Sent: Tuesday, June 27, 2000 11:21 AM
> To: xerces-c-dev
> Subject: Announcing revision 'a' of Xerces-C 1.2.0.
>
>
> Like to announce the availability of Xerces-C 1.2.0a (still unzip's
> to the same directory as the 1.2.0 release).
>
> There were two major problems reported with Xerces-C 1.2.0 that
> we released on June 21, which are:
>
> > (a) DOM_Attr.getSpecified always returns true for a valid
> attribute node. I
> > might have misread the DOM Specs, but I thought that this
> function returned
> > false when an element's attribute has a default value, with the
> _document_
> > having no mention of said attribute.

I have checked this on my machine, and it works.
Thank you for changing this.

> Again, unless any other severe defects are reported, this is what
> Xerces-C 1.2.0 will be.
>

Unfortunately, the problem with DOM_Notation.getSystemId() appears to be
there. (That is, always returning an empty string.) Even after I altered my
test files in light of Dean Roddey's comments:

=========================================================================
YOu can't give both PUBLIC and SYSTEM. The way it works is that its either:

    SYSTEM "Somesystemid"

or

    PUBLIC "somepublicid" "somesystemid"

So SYSTEM indicates its just a system id. PUBLIC indicates that its both a
public id and a system id, since the system id is always required.
=========================================================================

I checked DOMParser.cpp. Two oddities in the code:

====================================
void DOMParser::notationDecl
(
    const   XMLNotationDecl&    notDecl
    , const bool                isIgnored
)
{
	NotationImpl* notation =
((DocumentImpl*)fDocument.fImpl)->createNotation(notDecl.getName());
	notation->setPublicId(notDecl.getPublicId());
	notation->setPublicId(notDecl.getPublicId());

// PKM: shouldn't this be "notation->setSystemId(notDecl.getSystemId());" or
is the repetition useful???

	fDocumentType->notations->setNamedItem( notation );

	if (fOldDocTypeHandler)
	{
		fOldDocTypeHandler->notationDecl(notDecl, isIgnored);
	}
}
====================================

AND:

=====================================
void DOMParser::populateDocumentType()
{

/* ... */

	NameIdPoolEnumerator<XMLNotationDecl> notationPoolEnum =
((DTDValidator*)fValidator)->getNotationEnumerator();

	while(notationPoolEnum.hasMoreElements()) {
		XMLNotationDecl* notationDecl = &notationPoolEnum.nextElement();

		NotationImpl* notation =
((DocumentImpl*)fDocument.fImpl)->createNotation(notationDecl->getName());
		notation->setPublicId(notationDecl->getPublicId());
		notation->setPublicId(notationDecl->getPublicId());
// PKM: Shouldn't that be
"notation->setSystemId(notationDecl->getSystemId());", or is the repetition
also useful???

		fDocumentType->notations->setNamedItem( notation );
	}
}
=====================================

One more oddity: I tweaked around with my copy of the code - changing the
second "setPublicId" to setSystemId" in each of these cases, and back. Upon
experimentation, I found that changing DOMParser::notationDecl() would
actually correct the problem in getSystemId - despite it being marked as
"Deprecated" in the API docs.
(http://xml.apache.org/xerces-c/apiDocs/class_DOMParser.html#a64)

I hope that helps. If desired, I can forward the files and source I've used
to test this.

Regards,
Peter.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic