Skip to main content

Using xsl:strip-space in an XSL Stylesheet component (USoft 10.1.1B) results in this error:

White space cannot be stripped from input documents that have already been loaded. Provide the input document as an XmlReader instead.

 

Anyone know an easy way to work around this? Thanks!

Marc,

As a workaround you could use USXSL.apply instead of a XSL component.

I reproduced your error after creating a working example using USXSL.apply.

You might recognize my data model in the XSLT:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:strip-space elements="Sequence_Numbers TABLE_SEQUENCE_NUMBERS" />

<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>

<xsl:template match="Sequence_Numbers/TABLE_SEQUENCE_NUMBERS">
<xsl:value-of select="@TABLE_NAME"/>
<xsl:text> ( </xsl:text>
<xsl:value-of select="@SEQNO"/>
<xsl:text> ) </xsl:text>
</xsl:template>

</xsl:stylesheet>

Regards,

Robert


Yes, USXSL would be an option, but I was looking for an easy solution 😉. I’ll wait for the fix to land, but if necessary will turn the the USXSL component. Thanks!


Reply