Restricting the indentation in xslt transformation!

Here should go questions about transforming XML with XSLT and FOP.
mu258770
Posts: 111

Restricting the indentation in xslt transformation!

Thu Mar 10, 2016 8:29 am

Hi team,

I am working on transforming xml elements using xslt. I am using " xalan:indent-amount="2" " in the xsl output declaration to indent my output xml. This indents all my output elements when converted. But, I would like to restrict this. Like, I do not want the indentation to work for one specifice template or element, but for remaining it should work.

How it is possible? I have searched for the solution, but could not get any match for my requirement.

Please help.

Regards,
Shabeer
mu258770
Posts: 111

Re: Restricting the indentation in xslt transformation!

Thu Mar 10, 2016 7:50 pm

Hi team,

I have one more query related to xslt.

For stripping the unwanted spaces, we use <xsl:strip-space elements="*" /> . But this strips the spaces in every element. I would like to preserve space for one particular element. I tried using <xsl:preserve-space elements="..."/> option and it didn't work.

I have so many elements in the input document, and I just want to preserve space for one particular element.

If there is a way to do, please let me know. Would be a big help!

Regards,
Shabeer

Return to “XSLT and FOP”

Who is online

Users browsing this forum: No registered users and 0 guests