S
sucheta.phatak
Hello,
I am trying to use XSLT. Here is the problem that I am facing.
My XML file:
<Book level="1" name="Mapplicationtoc1">
....... Some more tags
</Book>
My XSL file
1) a.xsl
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:abc="http://www.abc.com/">
<xsl:include href="../../shared/myxsl.xsl" />
<xsl:template match="abc:Book">
//Book
<xsl:variable name="tempMsg">
<xsl:value-of select="@name"/>
</xsl:variable>
<xsl:value-of select= "*[$tempMsg]"/>
</xsl:template>
</xsl:stylesheet>
Contents of
2)myxsl.xsl
<xsl:variable name="Mapplicationtoc1">About MyXSL</xsl:variable>
<some more such messages>
Now in the output I want "About MyXSL" to be displayed after
applying the templates for Book.
This is some thing like "pointer to pointer". I want to retrieve
the book name which is "Mapplicationtoc1" and I want the value of
variable named Mapplicationtoc1. This variable is present in myxsl.xsl.
What is the solution for this? I goggled a bit on this and got that
*[local-name() = $tempMsg] should be used but this does not work in my
case.
Waiting for reply
Regards,
Sucheta Phatak,
I am trying to use XSLT. Here is the problem that I am facing.
My XML file:
<Book level="1" name="Mapplicationtoc1">
....... Some more tags
</Book>
My XSL file
1) a.xsl
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:abc="http://www.abc.com/">
<xsl:include href="../../shared/myxsl.xsl" />
<xsl:template match="abc:Book">
//Book
<xsl:variable name="tempMsg">
<xsl:value-of select="@name"/>
</xsl:variable>
<xsl:value-of select= "*[$tempMsg]"/>
</xsl:template>
</xsl:stylesheet>
Contents of
2)myxsl.xsl
<xsl:variable name="Mapplicationtoc1">About MyXSL</xsl:variable>
<some more such messages>
Now in the output I want "About MyXSL" to be displayed after
applying the templates for Book.
This is some thing like "pointer to pointer". I want to retrieve
the book name which is "Mapplicationtoc1" and I want the value of
variable named Mapplicationtoc1. This variable is present in myxsl.xsl.
What is the solution for this? I goggled a bit on this and got that
*[local-name() = $tempMsg] should be used but this does not work in my
case.
Waiting for reply
Regards,
Sucheta Phatak,