W3C home > Mailing lists > Public > www-xsl-fo@w3.org > May 2008

Re: Newbie Question

From: Dave Pawson <dave.pawson@gmail.com>
Date: Wed, 7 May 2008 07:52:35 +0100
Message-ID: <711a73df0805062352l390c9063p874d317eea579736@mail.gmail.com>
To: "Frank Merrow" <fmerrow@qualcomm.com>
Cc: www-xsl-fo@w3.org

2008/5/7 Frank Merrow <fmerrow@qualcomm.com>:
>  I'm trying to learn XLS myself with limited success.

Then join the xslt mailing list at mulberrytech.com!

>  So this is my input record:
>  <AI00010002
> type='wiki'>Status_Message_for_APS_MobModel_and_QXDM</AI00010002>
>  and this is what I want for an output record:
>  <aitag type="wiki">Status_Message_for_APS_MobModel_and_QXDM</aitag>
>  I'm almost there . . . what goes in the place I am missing?

<xsl:template match="AI00010002">
<xsl:copy-of select="@type"/>

>  <aitag><xsl:attribute name="type">what goes
> here?</xsl:attribute><xsl:value-of select="."/></aitag>

You need to google on 'pull and push' templates!

The 'apply-templates' uses the default (implied) templates
to process the children of the element; which for text
means to copy the text from the input xml instance to the
output file, which is what you want.


Dave Pawson
Received on Wednesday, 7 May 2008 06:53:07 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:10:08 UTC