[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Simple Transform Breaking

Subject: Simple Transform Breaking
From: "Hank Ratzesberger xml@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 2 Dec 2014 16:43:37 -0000
 Simple Transform Breaking
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.