Re: [xsl] Problem with "value-of" tags in XSLT to be placed at desired location in Text Output

Subject: Re: [xsl] Problem with "value-of" tags in XSLT to be placed at desired location in Text Output
From: "Jagdishwar B" <jagdishwar.beemanati@xxxxxxxxx>
Date: Mon, 22 May 2006 22:07:25 +0200
there are several changes required in your xslt,
e.g.
       <xsl:template match="inventory/server"> and not
match="domain-name/server"

try the xsl below:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
      <xsl:output method="text" indent="yes"/>
       <xsl:template match="inventory/server">
 insert into server (

'oracleAppVersion',java-version,java-vendor,java-vm-version,java-vm-vendor,ja
va-vm-name,os-arch,os-name,os-version
) values (
  <xsl:value-of select="comp/weblogic-version"/>,
  <xsl:value-of select="java/version"/>,
  <xsl:value-of select="java/vendor"/>,
  <xsl:value-of select="java/vm/version"/>,
  <xsl:value-of select="java/vm/vendor"/>,
  <xsl:value-of select="java/vm/name"/>,
  <xsl:value-of select="os/arch"/>,
  <xsl:value-of select="os/name"/>,
  <xsl:value-of select="os/version"/>
 );
</xsl:template>
<xsl:template match="jdbc-data">
 insert into jdbc-data (

'oracleAppVersion',java-version,java-vendor,java-vm-version,java-vm-vendor,ja
va-vm-name,os-arch,os-name,os-version
) values (
  <xsl:value-of select="datasource/driver-name"/>,
      <xsl:value-of
select="datasource/database-product-version"/>,
          <xsl:value-of
select="datasource/database-product-name"/>,

 );
</xsl:template>
</xsl:stylesheet>


--


Jagdishwar B.

Current Thread