i'm looking for a way replace the texts (|mista| , |mihin| and |tieto1|) in the element <ltype>
with the following link information
<a target="A3">
<xsl:attribute name="href" >
lock_004.asp?key=
<xsl:value-of select="frompos" />
</xsl:attribute>
<xsl:value-of select="frompos" />
</a>
so to replace if it exist
|mista| --> <frompos> element information
|mihin| --> <fromname> element information
|tieto1| --> <data1> element information
the xml-document is produced with asp directly from the server database, so it doesn't exist in the server. the links between the documents would create a new document directly from the database and the key value for the
lock_004.asp?key would be the <frompos> element value.
<?xml version="1.0" encoding="iso-8859-1"?>
<?xml:stylesheet type="text/xsl" href="lock_loop_004.xsl"?>
<loop>
<loopdata>
<posno>455-567</posno>
<posname>Rejektipumppu</posname>
<lintention>Pumppaa rejektin massatorniin</lintention>
</loopdata>
<inlock>
<interlock lmtype="LM">LM</interlock>
<id>3</id>
<active>2</active>
<ltype ltype="LM02">|mista| pysähtyminen käynnistää |mihin| viiveellä |tieto1|</ltype>
<frompos>455-322</frompos>
<fromname>Siirtoruuvi 1</fromname>
<topos>455-567</topos>
<toname>Rejektipumppu</toname>
<data1>1</data1>
<data2>seis</data2>
<data3></data3>
</inlock><br/>
<inlock>
<interlock lmtype="LM">LM</interlock>
<id>6</id>
<active>3</active>
<ltype ltype="LM03">|mista| pysähtyminen lukitsee |mihin| seis</ltype>
<frompos>455-323.1</frompos>
<fromname>Siirtoruuvi 3_1</fromname>
<topos>455-567</topos>
<toname>Rejektipumppu</toname>
<data1>1</data1>
<data2>seis</data2>
<data3></data3>
</inlock><br/>
</loop>
I try put in the replacing codes for the examples, but still confused how to do it
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="<xslutput method="html" indent="yes" encoding="iso-8859-1"/>
<xsl:template match="/">
<html>
<head>
</head>
<body>
<h2><xsl:value-of select="//posno" /> <xsl:value-of select="//posname" /></h2>
<table border="0" borderwidth="1">
<tr STYLE="display:inline; color:black;font-size: 12pt;">
<td width='150' STYLE="display:inline; color:black; font-size: 14pt;"><b>Tarkoitus:</b></td><td><xsl:value-of select="//lintention" /></td>
</tr>
</table>
<table border="0" borderwidth="1">
<tr STYLE="display:inline; color:black;font-size: 14pt;">
<td><b>Lukitukset:</b></td>
</tr>
<tr></tr>
<xsl:for-each select="loop/inlock[interlock='LM']">
<xsl:sort select="frompos"/>
<tr STYLE="display:inline; color:black;font-size: 12pt;">
<td>
<a target="A3">
<xsl:attribute name="href" >
lock_004.asp?key=
<xsl:value-of select="frompos" />
</xsl:attribute>
<xsl:value-of select="frompos" /></a>
<xsl:value-of select="fromname"/>
<xsl:value-of select="ltype" />
<xsl:apply-templates select="ltype"/>
<xsl:value-of select="topos" />
<xsl:value-of select="toname" />
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
with the following link information
<a target="A3">
<xsl:attribute name="href" >
lock_004.asp?key=
<xsl:value-of select="frompos" />
</xsl:attribute>
<xsl:value-of select="frompos" />
</a>
so to replace if it exist
|mista| --> <frompos> element information
|mihin| --> <fromname> element information
|tieto1| --> <data1> element information
the xml-document is produced with asp directly from the server database, so it doesn't exist in the server. the links between the documents would create a new document directly from the database and the key value for the
lock_004.asp?key would be the <frompos> element value.
<?xml version="1.0" encoding="iso-8859-1"?>
<?xml:stylesheet type="text/xsl" href="lock_loop_004.xsl"?>
<loop>
<loopdata>
<posno>455-567</posno>
<posname>Rejektipumppu</posname>
<lintention>Pumppaa rejektin massatorniin</lintention>
</loopdata>
<inlock>
<interlock lmtype="LM">LM</interlock>
<id>3</id>
<active>2</active>
<ltype ltype="LM02">|mista| pysähtyminen käynnistää |mihin| viiveellä |tieto1|</ltype>
<frompos>455-322</frompos>
<fromname>Siirtoruuvi 1</fromname>
<topos>455-567</topos>
<toname>Rejektipumppu</toname>
<data1>1</data1>
<data2>seis</data2>
<data3></data3>
</inlock><br/>
<inlock>
<interlock lmtype="LM">LM</interlock>
<id>6</id>
<active>3</active>
<ltype ltype="LM03">|mista| pysähtyminen lukitsee |mihin| seis</ltype>
<frompos>455-323.1</frompos>
<fromname>Siirtoruuvi 3_1</fromname>
<topos>455-567</topos>
<toname>Rejektipumppu</toname>
<data1>1</data1>
<data2>seis</data2>
<data3></data3>
</inlock><br/>
</loop>
I try put in the replacing codes for the examples, but still confused how to do it
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="<xslutput method="html" indent="yes" encoding="iso-8859-1"/>
<xsl:template match="/">
<html>
<head>
</head>
<body>
<h2><xsl:value-of select="//posno" /> <xsl:value-of select="//posname" /></h2>
<table border="0" borderwidth="1">
<tr STYLE="display:inline; color:black;font-size: 12pt;">
<td width='150' STYLE="display:inline; color:black; font-size: 14pt;"><b>Tarkoitus:</b></td><td><xsl:value-of select="//lintention" /></td>
</tr>
</table>
<table border="0" borderwidth="1">
<tr STYLE="display:inline; color:black;font-size: 14pt;">
<td><b>Lukitukset:</b></td>
</tr>
<tr></tr>
<xsl:for-each select="loop/inlock[interlock='LM']">
<xsl:sort select="frompos"/>
<tr STYLE="display:inline; color:black;font-size: 12pt;">
<td>
<a target="A3">
<xsl:attribute name="href" >
lock_004.asp?key=
<xsl:value-of select="frompos" />
</xsl:attribute>
<xsl:value-of select="frompos" /></a>
<xsl:value-of select="fromname"/>
<xsl:value-of select="ltype" />
<xsl:apply-templates select="ltype"/>
<xsl:value-of select="topos" />
<xsl:value-of select="toname" />
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>