cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Pietschmann" <Stefan.Pietschm...@inf.tu-dresden.de>
Subject Re: whitespaces using xsl:copy-of
Date Sun, 01 Jun 2003 10:00:34 GMT
Thanx alot,

that worked like a charm ;)

regards,
Stefan

----- Original Message ----- 
From: "Wei Tjong" <weitjong@magix.com.sg>
To: <cocoon-users@xml.apache.org>
Sent: Sunday, June 01, 2003 8:15 AM
Subject: Re: whitespaces using xsl:copy-of


> Hi Stephan,
>
> Try <xsl:strip-space elements="tagA"/>.  This is a top level element, so
it
> must come after the <xsl:stylesheet> element.
>
> Best regards,
> Liaw Wei Tjong
>
> ----- Original Message ----- 
> From: Stefan Pietschmann
> To: cocoon-users@xml.apache.org
> Sent: Sunday, June 01, 2003 12:39 AM
> Subject: whitespaces using xsl:copy-of
>
>
> 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
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message