This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: XML -> XML




>take raw xml and keep it
>in the same format, 
Like this
<xsl:template match="Element1">
  <Element1>
    <xsl:for-each select="@*">
      <xsl:copy />
    </xsl:for-each>
    <xsl:apply-templates/>
  </Element1>
</xsl:template>

>but maybe change an attribute, say:
>date="some format"
>to
>date="some new format"
I'm not sure of your intent, but this is a simple way:
<xsl:template match="Element2">
  <Element2 date ="{@date}-plus my specified string">
    <xsl:apply-templates/>
  </Element2>
</xsl:template>

If you actually want to change something like

date="mm-dd-yy" to date="dd-mm-yyyy"

it's not so simple


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]