hi guys,
at the moment I'm writing a Transformer for Cocoon
2.0.4 and my problem is as follows:
There are certain tags not touched by the xslt a
step earlier in the pipeline and I want to read them out. let's say the
structure is:
<tagA>
<sub/>
</tagA>
Now I simply use xsl:copy-of in my XSLT to
copy tagA over in the output, so I am able to read it out in the following
Transformer step.
There I can search for tagA and make it a Node
variable. I want to check whether the first childnode of it is called "sub" or
"seb".
When I just output all the childnodes of tagA with
their names (getNodeName()) I get
child1: "#text:
"
child2: "sub: ...."
child3: "#text: "
well, it seems obvious that there are whitespaces
before and after the sub tag, which occur when using copy-of with an indented
(a.k.a pretty-printed) document.
If i change the original to be like <tagA><sub/></tagA> sub is the first
and only childnode, otherwise not.
Now the question: Can I somehow get rid of
whitespaces between tags when copying tagA over to the output in my
xslt?
Thanx for your help and I hope you got what i meant
:P
Stefan Pietschmann
|
- Re: whitespaces using xsl:copy-of Stefan Pietschmann
- Re: whitespaces using xsl:copy-of Joerg Heinicke
- Re: whitespaces using xsl:copy-of Wei Tjong
- Re: whitespaces using xsl:copy-of Stefan Pietschmann