Creating an .XSL file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Stu

    #1

    Creating an .XSL file

    can sombody point me in the right direction.

    I have an XML file (see below) and I am looking to create an .xsl file
    that will
    replace this line <actual_volume> {VAR}</actual_volumewi th this
    line <actual_volume> e:/tmp/xyz</actual_volume>

    Thanks to all who answer this post

    <axsone_dbmap version="1.0">
    <dbmap_entrie s>
    <dbmap_entry>
    <logical_librar y>LOG</logical_library >
    <actual_library >logs</actual_library>
    <actual_volume> {ABC}</actual_volume>
    </dbmap_entry>
    <dbmap_entry>
    <logical_librar y>CONFIG</logical_library >
    <actual_library >config</actual_library>
    <actual_volume> ${CTRONHOME}</actual_volume>
    </dbmap_entry>
    <dbmap_entry>
    <logical_librar y>DATA</logical_library >
    <actual_library >data</actual_library>
    <actual_volume> {VAR}</actual_volume>
    </dbmap_entry>
    </dbmap_entries>
    </axsone_dbmap>
  • TOUDIdel

    #2
    Re: Creating an .XSL file


    Uzytkownik "Stu" <beefstu350@hot mail.comnapisal w wiadomosci
    news:1d092899-3c07-45e3-a588-8b0baf41964f@s5 0g2000hsb.googl egroups.com...
    I ONLY want to to change the line <actual_volume> {VAR}</
    >actual_volum e WHERE <logical_librar y>DATA</logical_library in my
    >example, which I failed to show earlier I could have multiple lines
    >of <actual_volume> {VAR}</actual_volume>. Your solution changes
    >eveything.

    <xsl:styleshe et
    xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
    version="1.0">

    <xsl:template match="@* | node()">
    <xsl:copy>
    <xsl:apply-templates select="@* | node()"/>
    </xsl:copy>
    </xsl:template>

    <xsl:template match="actual_v olume[. = '{VAR}' and
    .../logical_library/text() = 'DATA']">
    <xsl:copy>
    <xsl:text>e:/tmp/xyz</xsl:text>
    </xsl:copy>
    </xsl:template>
    </xsl:stylesheet>


    --
    td


    Comment

    Working...