- From: Dave Pawson <dave.pawson@gmail.com>
- Date: Wed, 7 May 2008 07:52:35 +0100
- 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"> <aitag> <xsl:copy-of select="@type"/> <xsl:apply-templates/> </xsl:template> > > <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. HTH -- Dave Pawson XSLT XSL-FO FAQ. http://www.dpawson.co.uk
Received on Wednesday, 7 May 2008 06:53:07 UTC