|
Subject: Re: Re: [xsl] Check if text is before an tag or not From: "Sebastien deprez" <sebastien.deprez@xxxxxxxxxx> Date: Wed 12 Nov 2003 14:11:22 +0100 |
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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Check if text is before , David Carlisle | Thread | Re: [xsl] Check if text is before , David Carlisle |
| Re: [xsl] simple question: <fo: and, David Carlisle | Date | Re: [xsl] simple question: <fo: and, Barry van Weldam |
| Month |