You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Gustavo de Sá Carvalho Honorato <gu...@gmail.com> on 2009/12/01 15:12:03 UTC
Error in output when xmlns attribute is present
Hi all,
I'm having some problems using Xalan to make XSLT using JAXP Java API. When
xmlns attribute is not present in root element of the input xml, the output
is fine. When xmlns is present, Xalan is generating an empty output. Is
there any issue regarding this? I've been searching all over the
documentation and I could not find anything.
Thanks in advance,
Gustavo Honorato
Re: Error in output when xmlns attribute is present
Posted by ke...@us.ibm.com.
The xmlns attribute sets the default namespace. XSLT is
namespace-sensitive; to match namespace-qualified elements and attributes
you must match the namespaces as well (which means using prefixes in your
XSLT even though you used the default in the instance document, since XSLT
1.0 has no ability to specify a default namespace for its match/select
patterns).
______________________________________
"... Three things see no end: A loop with exit code done wrong,
A semaphore untested, And the change that comes along. ..."
-- "Threes" Rev 1.1 - Duane Elms / Leslie Fish (
http://www.ovff.org/pegasus/songs/threes-rev-11.html)