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 Sonja Löhr <so...@arcor.de> on 2005/09/07 15:50:40 UTC

whitespace-stripping and document()

Hi, all!

Since i migrated to tomcat 5.5 and letting my applications use the 
new JAXP1.3 with xsltc, I have a lot of trouble with my "old"
stylesheets that worked fine before.

I solved many problems, but one thing concerning whitespace is driving
me crazy:

Despite of 

<xsl:strip-space elements="*"/>

there are some whitespace-only nodes that are NOT stripped, and as far
as I can see, this is the case when I process nodes in another xml
document (accessed via the document() function). 
The space enclose the (stripped) output of the processing of these
"foreign document nodes".

Does anyone know about this issue and how to resolve it?

I deleted all whitespace in the stylesheet where these nodes are
processed, it didn't help.

It' really important because the output is regular expressions, so a
newline within the pattern is really not good ;-)

Thanks a lot!

sonja









Re: whitespace-stripping and document()

Posted by Mukul Gandhi <ga...@gmail.com>.
I believe xsl:strip-space strips whitespace nodes from the primary
document and not from the secondry documents loaded with document()
function. I think you can strip whitespace nodes(ignore them) from
secondry documents using suitable XPath expressions.

Regards,
Mukul

On 9/7/05, Sonja Löhr <so...@arcor.de> wrote:
>
> Hi, all!
>
> Since i migrated to tomcat 5.5 and letting my applications use the
> new JAXP1.3 with xsltc, I have a lot of trouble with my "old"
> stylesheets that worked fine before.
>
> I solved many problems, but one thing concerning whitespace is driving
> me crazy:
>
> Despite of
>
> <xsl:strip-space elements="*"/>
>
> there are some whitespace-only nodes that are NOT stripped, and as far
> as I can see, this is the case when I process nodes in another xml
> document (accessed via the document() function).
> The space enclose the (stripped) output of the processing of these
> "foreign document nodes".
>
> Does anyone know about this issue and how to resolve it?
>
> I deleted all whitespace in the stylesheet where these nodes are
> processed, it didn't help.
>
> It' really important because the output is regular expressions, so a
> newline within the pattern is really not good ;-)
>
> Thanks a lot!
>
> sonja