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

Re: Re: Check if text is before an tag or not

Subject: Re: Re: Check if text is before an tag or not
From: "Sebastien deprez" <sebastien.deprez@xxxxxxxxxx>
Date: Wed 12 Nov 2003 14:11:22 +0100
sebastien deprez
I'll explain some more:

XML:

<itemInv n="4">
   <itemDesc>
     <locus target="0101_II2618FOL0013V">fol. 13v</locus> 
     <title TEIform="title">
     <name reg="Séneca" type="person" role="author">Séneca</name> 
     y 
     <name reg="Cicerón, Marco Tulio" type="person" role="author">Cicerón</name> 
      en castellano de los oficios 
      </title>
    </itemDesc>
</itemInv>

XLS so for (trying):
<xsl:choose>
 <xsl:when test="itemInv/itemDesc/title/name != ''">				<xsl:variable name="nrEntrada">						<xsl:value-of select="itemInv/@n" />				</xsl:variable>							<xsl:for-each select="itemInv/itemDesc/title/name">			  <a href="JavaScript:authorWindow('{$inventario}',{$nrEntrada});" class="linkAuthor">								      <xsl:value-of select="." /					   </a>								</xsl:for-each> - 							<xsl:value-of select="itemInv/itemDesc/title" />		
  </xsl:when>
  <xsl:otherwise>								<xsl:value-of select="itemInv/itemDesc/title" />
  </xsl:otherwise>
</xsl:choose>


Currently I get the following output:
-> Séneca Cicerón - Sénecay Cicerónde los oficios"
With both Séneca & Cicerón clickable.

The output should be:
-> Séneca y Cicerón - de los oficios

In another part of the xml, for example:
 <title>de los oficios
      <name reg="Séneca" type="person" role="author">Séneca</name> 
 </title>

here the output I wanted to be is:
-> de los oficios - Séneca
With Séneca (as always, clickable)

This is still a big question for me to work this out.
I know there has to be some way, but still cant think of it...

Anyhow, thanks for the reply's already!

Greetings
Sebastien Deprez

------------------------
 xsl-list@xxxxxxxxxxxxxxxxxxxxxx wrote:
------------------------
	
>> 
>> Jup, I want to process the nodes in orde of appearance, but the only
>> problem is that there is normal text and tags together 
>
>As Michael said, processing text and elements (not tags) in the order
>they appear is the default behaviour of xslt, so it isn't clear why you
>can't just do 
>
>David
>
>-- 
>http://www.dcarlisle.demon.co.uk/matthew
>
>________________________________________________________________________
>This e-mail has been scanned for all viruses by Star Internet. The
>service is powered by MessageLabs. For more information on a proactive
>anti-virus service working around the clock, around the globe, visit:
>http://www.star.net.uk
>________________________________________________________________________
>
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.