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

same content refuses to convert

Subject: same content refuses to convert
From: a kusa <akusa8@xxxxxxxxx>
Date: Tue, 2 Mar 2010 13:19:09 -0600
 same content refuses to convert
Hi

I have a very strange problem. I will try to explain it as effectively
as possible.

When I have the same content in the XML, it fails to transform.

Example:

My input looks like this:

<list2>
 <item><text>First text</text></item>
<item><text>Second text</text></item>
 <item><text>Third text</text></item>
 <item><text>First text</text></item>
 <item><text>Fourth text</text></item>
 <item><text>First text</text></item>
</list2>

Converted output:

<step2>
<text>First text</text>
</step2>
<step2>
<text>Second text</text>
</step2>
<step2>
<text>Third text</text>
</step2>
<step2>
<text>Fourth text</text>
</step2>

As you can see the 'First text' content at the fourth and last item
level is missing from the output.

And in my XSLT which is rather long, all I am doing is a template
match on list2, item, and a template match on text.

<xsl:template match="list2">
	<xsl:apply-templates select="*[not(following-sibling::list3)]"/>
<xsl:for-each select="item">
<step2>
<text>

</text>

</step2>
<xsl:apply-templates
select="following-sibling::*[1][not(self::item)]|list3|item"/>
</xsl:for-each>


</xsl:template>


What am I doing here that is making it skip the content is the content
is duplicated?

Any help/suggestions is appreciated.

Thanks in advance.

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.