Subject: Re: [xsl] Generating a CSV file using XSLT From: "Joris Gillis" <roac@xxxxxxxxxx> Date: Wed, 09 Feb 2005 12:29:18 +0100 |
Hi,<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="text"/> <xsl:template match="BuildingRecord"> <xsl:value-of select="normalize-space(SchemeUniqueRecordIdentifier)"/>, <xsl:value-of select="normalize-space(CompetentPerson/PersonRegistrationNumber)"/>, <xsl:value-of select="normalize-space(CompetentPerson/InstallerRegisteredName)"/>, <xsl:value-of select="normalize-space(WorkPerformed/PropertyInformation/PropertyLocati on/PropertyAddress/)"/>, <xsl:value-of select="normalize-space(WorkPerformed/DateWorkCompleted)"/>, <xsl:value-of select="normalize-space(WorkPerformed/DescriptionOfWorkItem)"/>, </xsl:template> </xsl:stylesheet>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:apd="http://www.govtalk.gov.uk/people/AddressAndPersonalDetails">
<xsl:template match="/"> <xsl:apply-templates select="//BuildingRecord"/> </xsl:template>
<xsl:template match="BuildingRecord"> <xsl:apply-templates select=".//text()"/> <xsl:text> </xsl:text> </xsl:template>
<xsl:template match="text()"> <xsl:if test="position() > 1 "><xsl:text>,</xsl:text></xsl:if> <xsl:value-of select="normalize-space(.)"/> </xsl:template>
<xsl:template match="apd:*//text()"> <xsl:value-of select="normalize-space(.)"/><xsl:text> </xsl:text> </xsl:template>
regards, -- Joris Gillis (http://www.ticalc.org/cgi-bin/acct-view.cgi?userid=38041) "Et ipsa scientia potestas est" - Francis Bacon , Meditationes sacrae
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Generating a CSV file usi, Arun Sinha | Thread | RE: [xsl] Generating a CSV file usi, Ian Vaughan |
RE: [xsl] Generating a CSV file usi, Arun Sinha | Date | Re: [xsl] Interation and Variables, David Carlisle |
Month |