xsl-list
[Top] [All Lists]

Re: [xsl] Simple Transform Breaking

2014-12-02 12:09:45
Hi,

Ye old non-descript description, sorry,

I get no output at all if i don't first <copy-of> the root node.

The transform runs fine on Saxon 9.6, so we are looking at a bug with
the java 7 implementation.

Thanks everyone, we can close this issue. I could not find a
work-around within Eclipse+Java 7.

--Hank



On Tue, Dec 2, 2014 at 9:40 AM, Michael Kay mike(_at_)saxonica(_dot_)com
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:
What do you mean by saying it is "breaking"? What are the symptoms?

Michael Kay
Saxonica
mike(_at_)saxonica(_dot_)com
+44 (0) 118 946 5893




On 2 Dec 2014, at 16:44, Hank Ratzesberger xml(_at_)xmlwerks(_dot_)com 
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:

Greetings Transformative Ones,

I have so simple a transform, that I am running under Eclipse (uses
JAXPSAXProcessorInvoker under Java 7). For some reason, I need to
include a copy-of element for the other for-each elements to output
anything. It seems this must be an issue with the processor, could
there be any other reason?

Where I work, Eclipse is the development platform, but I'm checking
against some other environments now.

Cheers,
Hank

The transform:
====================
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

<!-- <xsl:output method="xml" indent="yes" /> -->

<xsl:variable name="crlf"><xsl:text>
</xsl:text></xsl:variable>

<xsl:template match="/">

<!--  remove this test only line and the whole thing breaks. -->
<xsl:copy-of select="."/>

<xsl:for-each select="RESULTS/ROW">
<xsl:text>blah </xsl:text>
</xsl:for-each>

<xsl:for-each select="RESULTS/ROW">
<xsl:value-of select="COLUMN"/>
<xsl:value-of select="$crlf"/>
</xsl:for-each>
</xsl:template>
<xsl:template match="/RESULTS/ROW">
<xsl:value-of select="$crlf"/>
<xsl:value-of select="substring-before(name(.),'W')"/>
</xsl:template>

</xsl:stylesheet>


The source xml:
=======================
<RESULTS>
<ROW>
<COLUMN NAME="NAME"><![CDATA[TOS_PEER_REVIEWER_0]]></COLUMN>
<COLUMN NAME="ROLE_ID"><![CDATA[50000000153]]></COLUMN>
</ROW>
<ROW>
<COLUMN NAME="NAME"><![CDATA[TOS_VIEWERS_0]]></COLUMN>
<COLUMN NAME="ROLE_ID"><![CDATA[50000000158]]></COLUMN>
</ROW>
<ROW>
<COLUMN NAME="NAME"><![CDATA[TOS_PEER_REVIEWER_1]]></COLUMN>
<COLUMN NAME="ROLE_ID"><![CDATA[50000000164]]></COLUMN>
</ROW>
<ROW>
<COLUMN NAME="NAME"><![CDATA[TOS_TIME_KEEPER_1]]></COLUMN>
<COLUMN NAME="ROLE_ID"><![CDATA[50000000171]]></COLUMN>
</ROW>
</RESULTS>
=====================



--
Hank Ratzesberger
XMLWerks.com





-- 
Hank Ratzesberger
XMLWerks.com
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>
  • [xsl] Simple Transform Breaking, Hank Ratzesberger xml(_at_)xmlwerks(_dot_)com
    • Message not available
      • Re: [xsl] Simple Transform Breaking, Hank Ratzesberger xml(_at_)xmlwerks(_dot_)com <=