You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Senften René <r....@nzz.ch> on 2004/12/01 12:36:32 UTC

Namespace for xlink in DOMWriter.java

Hi

The XLink.java class uses the namespace "http://www.w3.org/1999/xlink",
which is IMHO correct. So whenever a document includes  "xlink", which
should be transformed by the lenya xlinktransformer, the namespaces has to
be set to "http://www.w3.org/1999/xlink". Unfortunately in our documentes
the namespace in the root element was set to "http://www.w3.org/xlink" and
therefor we had trouble with transforming. I was wondering when the
namespace was set to this. For writing this documents we're using the
DOMWriter.java. When i checked this class, i've realized it sets the
namespace for xlink to "http://www.w3.org/xlink". Should we change this to
"http://www.w3.org/1999/xlink" or is there a reason, why it has to be
"http://www.w3.org/xlink"?

It might be, we have to change the document "proxyconf.xml" too. 

I'v added the diff files just in case you would like to change this to
files. We are using the BRANCH_1_2_X.

best regards

René Senften

Neue Zürcher Zeitung AG * IT Neue Medien
Falkenstrasse 12 * Postfach * 8021 Zürich
Tel +41 1 258 12 83 * Fax +41 1 258 22 83
www.nzz.ch * r.senften@nzz.ch


 <<DOMWriter.java.diff>>  <<proxyconf.xml.diff>> 



Re: Namespace for xlink in DOMWriter.java

Posted by Andreas Hartmann <an...@apache.org>.
Senften René wrote:
> Hi
> 
> The XLink.java class uses the namespace "http://www.w3.org/1999/xlink",
> which is IMHO correct. So whenever a document includes  "xlink", which
> should be transformed by the lenya xlinktransformer, the namespaces has to
> be set to "http://www.w3.org/1999/xlink". Unfortunately in our documentes
> the namespace in the root element was set to "http://www.w3.org/xlink" and
> therefor we had trouble with transforming. I was wondering when the
> namespace was set to this. For writing this documents we're using the
> DOMWriter.java. When i checked this class, i've realized it sets the
> namespace for xlink to "http://www.w3.org/xlink". Should we change this to
> "http://www.w3.org/1999/xlink" or is there a reason, why it has to be
> "http://www.w3.org/xlink"?

The XLink namespace has to be http://www.w3.org/1999/xlink,
everything else will lead to errors. If the DOMWriter uses
a different string, then it's a bug.


> It might be, we have to change the document "proxyconf.xml" too. 
> 
> I'v added the diff files just in case you would like to change this to
> files. We are using the BRANCH_1_2_X.

Thanks! I committed the changes to the branch and will add them
to the trunk too. BTW, you can use XLink.XLINK_NAMESPACE instead
of hard-coding the namespace URI, this will help to avoid typos.

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail:              dev-unsubscribe@lenya.apache.org
For additional commands, e-mail:            dev-help@lenya.apache.org
Apache Lenya Project                          http://lenya.apache.org