Hi,
Yes, having such a statement in the constructor will be the solution but personally i would like to see the namespace object coming through the factory.
Theoreticaly this namespace declaration should take place only in the root element! So the tweak can also be done in the builder, is it not ?


On 4/13/05, jayachandra <[EMAIL PROTECTED]> wrote:
Sorry! the default uri for the prefix 'xml' should be
"http://www.w3.org/XML/1998/namespace" and the line of code that
should be added in the constructor(s) of OMElementImpl is

declareNamespace( new
OMNamespaceImpl("http://www.w3.org/XML/1998/namespace", "xml"));

Thanks
Jayachandra

On 4/13/05, jayachandra < [EMAIL PROTECTED]> wrote:
> Hi devs!
>
> In OMElementImpl the namespaces hashmap is initialized to null by
> default. This appears problematic. The XML-Infoset spec says inscope
> namespace of an element info item must ALWAYS contain one entry for
> 'xml' prefix having the URI as "http://www.w3.org/2000/xmlns/".
> (Refer to http://www.w3.org/TR/xml-infoset/#infoitem.element and look
> for [in-scope namespaces] property )
>
> Because of this simple thing we are loosing out on a good number of
> xml test cases from oasis where 'xml:base' kind of entries are
> frivolously used without bothering to declare the namespce for xml
> prefix explicitly.
>
> The following simple additional line of code in the constructor(s) of
> OMElementImpl should solve the issue and increase the XML test suite
> conformance lot more.
>
>    //By default entry for 'xml' prefix is always present as a
> in-scope namespace for every element
>    namespaces.put("xml", new
> OMNamespaceImpl("http://www.w3.org/XML/1998/namespace", "xml"));
>
> Thank you,
> Jaya
> --
>

--
-- Jaya



--
Ajith Ranabahu

Reply via email to