XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 9th, 2003, 06:49 AM
zaza zaza is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 2 zaza User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy xsl:for-each and text() problem

Hi there!
Firstly, sorry for my English... I'm not a native speaker.
I've got XML code which looks like this:

<book>
<para>
p1
<footnote>
<para>
f1
</para>
</footnote>
p2
<footnote>
<para>
f2
</para>
</footnote>
p3
</para>
</book>

The effect I would like to achive :

p1 * p2 * p3

I've tried to use such XSL stylesheet but it doesn't quite work:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

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

<xsl:template match="para">
<xsl:for-each select="text()">
<xsl:value-of select="."/>

</xsl:for-each>
<xsl:apply-templates select="footnote"/>
</xsl:template>

<xsl:template match="footnote">
*
</xsl:template>

</xsl:stylesheet>

I would appreciate any help.
Thanks!

Reply With Quote
  #2  
Old June 9th, 2003, 02:02 PM
zaza zaza is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 2 zaza User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
not really. the problem is that those * should be 'produced' by template which matches footnote. so i don't want them to be some kind of separator. other words i would like to proceed the template responsible for footnote after printing out p1 and before p2 and then proceed second footnote (write for example *) after p2 and before p3. i don't know how to do this because tag para which contains p1, p2 and p3 isn't closed before tag footnote begins. i hope it's clear now. thanks for help anyway, but i still wait for solution...

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > xsl:for-each and text() problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway