You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Yuen Ho Wong <wy...@gmail.com> on 2007/04/10 04:08:08 UTC
DOMImplementation.createDocument() bug?
Hi Everyone,
I have the following code using Xerces 2.9.0:
----------------------------------------------------------------------------------------------------------------------------------
DOMImplementationSource src = new DOMImplementationSourceImpl();
DOMImplementation domImpl = src.getDOMImplementation("XML 3.0 LS 3.0");
DOMImplementation domImpl = new DOMImplementationImpl();
// according to W3C's DOM 3 spec, this should give me a Document obj
without a document element
// but instead I got a NAMESPACE_ERR
doc = domImpl.createDocument(null, null, null);
----------------------------------------------------------------------------------------------------------------------------------
The culprit seems to be that DOMImplementationSourceImpl is returning a
CoreDOMImplementationImpl which doesn't implement createDocument() to
the spec. For some unknown reason the behavior conforming to the spec is
only implemented in DOMImplementationImpl, but
DOMImplementationSourceImpl doesn't return it unless a feature other
then Core, XML and LS is required.
CoreDOMImplementationImpl and DOMImplementationImpl really should be 1
single class just called DOMImplementationImpl, this sounds like a
design issue and a big bug to me, what do you think?
Yuen Ho Wong
---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org
Re: DOMImplementation.createDocument() bug?
Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Gump builds [1] Xerces-J fairly regularly. Any of the recent builds should
work.
[1] http://vmgump.apache.org/gump/public-jars/xml-xerces2/jars/
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org
Yuen Ho Wong <wy...@gmail.com> wrote on 04/10/2007 02:23:04 AM:
> Is there stable nightly build somewhere? I can't find the info to check
> out the latest source from Apache's SVN server and the snapshots online
> failed a bunch of tests quite miserably.
>
> Yuen Ho Wong
>
>
> Michael Glavassevich wrote:
> > Hi Yuen,
> >
> > I fixed this bug [1] just over a month ago. The fix will be in our
next
> > release (whenever that is).
> >
> > Just a bit of advice... If you're trying to get a DOMImplementation
you
> > should query the DOMImplementationRegistry [2] for one. Coding
directly to
> > the implementation classes isn't supported. We might alter or remove
those
> > classes at any time (even between bug fix releases).
> >
> > Thanks.
> >
> > [1] http://issues.apache.org/jira/browse/XERCESJ-1234
> > [2]
> > http://xerces.apache.org/xerces2-
> j/javadocs/api/org/w3c/dom/bootstrap/DOMImplementationRegistry.html
> >
> > Michael Glavassevich
> > XML Parser Development
> > IBM Toronto Lab
> > E-mail: mrglavas@ca.ibm.com
> > E-mail: mrglavas@apache.org
> >
> > Yuen Ho Wong <wy...@gmail.com> wrote on 04/09/2007 10:08:08 PM:
> >
> >
> >> Hi Everyone,
> >>
> >> I have the following code using Xerces 2.9.0:
> >>
> >>
> >>
> >
>
----------------------------------------------------------------------------------------------------------------------------------
> >
> >> DOMImplementationSource src = new DOMImplementationSourceImpl();
> >> DOMImplementation domImpl = src.getDOMImplementation("XML 3.0 LS
3.0");
> >>
> >> DOMImplementation domImpl = new DOMImplementationImpl();
> >>
> >> // according to W3C's DOM 3 spec, this should give me a Document obj
> >> without a document element
> >> // but instead I got a NAMESPACE_ERR
> >>
> >> doc = domImpl.createDocument(null, null, null);
> >>
> >>
> >>
> >
>
----------------------------------------------------------------------------------------------------------------------------------
> >
> >> The culprit seems to be that DOMImplementationSourceImpl is returning
a
> >> CoreDOMImplementationImpl which doesn't implement createDocument() to
> >> the spec. For some unknown reason the behavior conforming to the spec
is
> >>
> >
> >
> >> only implemented in DOMImplementationImpl, but
> >> DOMImplementationSourceImpl doesn't return it unless a feature other
> >> then Core, XML and LS is required.
> >>
> >> CoreDOMImplementationImpl and DOMImplementationImpl really should be
1
> >> single class just called DOMImplementationImpl, this sounds like a
> >> design issue and a big bug to me, what do you think?
> >>
> >> Yuen Ho Wong
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> >> For additional commands, e-mail: j-users-help@xerces.apache.org
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> > For additional commands, e-mail: j-users-help@xerces.apache.org
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org
Re: DOMImplementation.createDocument() bug?
Posted by Yuen Ho Wong <wy...@gmail.com>.
Is there stable nightly build somewhere? I can't find the info to check
out the latest source from Apache's SVN server and the snapshots online
failed a bunch of tests quite miserably.
Yuen Ho Wong
Michael Glavassevich wrote:
> Hi Yuen,
>
> I fixed this bug [1] just over a month ago. The fix will be in our next
> release (whenever that is).
>
> Just a bit of advice... If you're trying to get a DOMImplementation you
> should query the DOMImplementationRegistry [2] for one. Coding directly to
> the implementation classes isn't supported. We might alter or remove those
> classes at any time (even between bug fix releases).
>
> Thanks.
>
> [1] http://issues.apache.org/jira/browse/XERCESJ-1234
> [2]
> http://xerces.apache.org/xerces2-j/javadocs/api/org/w3c/dom/bootstrap/DOMImplementationRegistry.html
>
> Michael Glavassevich
> XML Parser Development
> IBM Toronto Lab
> E-mail: mrglavas@ca.ibm.com
> E-mail: mrglavas@apache.org
>
> Yuen Ho Wong <wy...@gmail.com> wrote on 04/09/2007 10:08:08 PM:
>
>
>> Hi Everyone,
>>
>> I have the following code using Xerces 2.9.0:
>>
>>
>>
> ----------------------------------------------------------------------------------------------------------------------------------
>
>> DOMImplementationSource src = new DOMImplementationSourceImpl();
>> DOMImplementation domImpl = src.getDOMImplementation("XML 3.0 LS 3.0");
>>
>> DOMImplementation domImpl = new DOMImplementationImpl();
>>
>> // according to W3C's DOM 3 spec, this should give me a Document obj
>> without a document element
>> // but instead I got a NAMESPACE_ERR
>>
>> doc = domImpl.createDocument(null, null, null);
>>
>>
>>
> ----------------------------------------------------------------------------------------------------------------------------------
>
>> The culprit seems to be that DOMImplementationSourceImpl is returning a
>> CoreDOMImplementationImpl which doesn't implement createDocument() to
>> the spec. For some unknown reason the behavior conforming to the spec is
>>
>
>
>> only implemented in DOMImplementationImpl, but
>> DOMImplementationSourceImpl doesn't return it unless a feature other
>> then Core, XML and LS is required.
>>
>> CoreDOMImplementationImpl and DOMImplementationImpl really should be 1
>> single class just called DOMImplementationImpl, this sounds like a
>> design issue and a big bug to me, what do you think?
>>
>> Yuen Ho Wong
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
>> For additional commands, e-mail: j-users-help@xerces.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org
Re: DOMImplementation.createDocument() bug?
Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Hi Yuen,
I fixed this bug [1] just over a month ago. The fix will be in our next
release (whenever that is).
Just a bit of advice... If you're trying to get a DOMImplementation you
should query the DOMImplementationRegistry [2] for one. Coding directly to
the implementation classes isn't supported. We might alter or remove those
classes at any time (even between bug fix releases).
Thanks.
[1] http://issues.apache.org/jira/browse/XERCESJ-1234
[2]
http://xerces.apache.org/xerces2-j/javadocs/api/org/w3c/dom/bootstrap/DOMImplementationRegistry.html
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org
Yuen Ho Wong <wy...@gmail.com> wrote on 04/09/2007 10:08:08 PM:
> Hi Everyone,
>
> I have the following code using Xerces 2.9.0:
>
>
----------------------------------------------------------------------------------------------------------------------------------
> DOMImplementationSource src = new DOMImplementationSourceImpl();
> DOMImplementation domImpl = src.getDOMImplementation("XML 3.0 LS 3.0");
>
> DOMImplementation domImpl = new DOMImplementationImpl();
>
> // according to W3C's DOM 3 spec, this should give me a Document obj
> without a document element
> // but instead I got a NAMESPACE_ERR
>
> doc = domImpl.createDocument(null, null, null);
>
>
----------------------------------------------------------------------------------------------------------------------------------
>
>
> The culprit seems to be that DOMImplementationSourceImpl is returning a
> CoreDOMImplementationImpl which doesn't implement createDocument() to
> the spec. For some unknown reason the behavior conforming to the spec is
> only implemented in DOMImplementationImpl, but
> DOMImplementationSourceImpl doesn't return it unless a feature other
> then Core, XML and LS is required.
>
> CoreDOMImplementationImpl and DOMImplementationImpl really should be 1
> single class just called DOMImplementationImpl, this sounds like a
> design issue and a big bug to me, what do you think?
>
> Yuen Ho Wong
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org