[jdom-interest] Name spaces and XSLT

Hans Verschoor hanjen at xs4all.nl
Tue Jun 18 15:06:26 PDT 2002


Thanks, Laurent and Ian

Of course you are both right this is not a JDOM problem and that the
namespace should be defined in the stylesheet. I tried it out with JDOM,
DOM4J and JAXP and it all works fine.

Thanks again, Hans


----- Original Message -----
From: "Laurent Bihanic" <laurent.bihanic at atosorigin.com>
To: "Hans Verschoor" <hanjen at xs4all.nl>
Cc: <jdom-interest at jdom.org>
Sent: Tuesday, June 18, 2002 12:18 PM
Subject: Re: [jdom-interest] Name spaces and XSLT


>
> Hi,
>
> I don't think this has anything to do with JDOM.  The problem is probably
that
> the abc and pqr namespaces are not defined IN the stylesheet itself.
> Try defining those :
>                    + "<xsl:stylesheet version=\"2.0\"\n"
>                    + "
xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"\n"
>  >>>               + "  xmlns:abc=\"urn:abc\" xmlns:pqr=\"urn:pqr\"\n"
>                    + "  xmlns=\"http://www.w3.org/1999/xhtml\">\n"
>
> Actually prefixes do not have to match, only the actuel namespace URIs
need to
> match. So you could define the prefix of namespace "urn:abc" as "xyz" in
the
> stylesheet and it would still match your "abc:abc" element from your input
> document.
>
> Laurent
>




More information about the jdom-interest mailing list