[Home] [By Thread] [By Date] [Recent Entries]
The Style Sheet that I used id
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fmp="http://www.filemaker.com/fmpxmlresult" exclude-result-prefixes="fmp"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="fmp:FMPXMLRESULT"> <UserProgram xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\xmldocs\csdaschema.xsd"> <ServiceUsers> <xsl:for-each select="fmp:RESULTSET/fmp:ROW[not(fmp:COL[1]/fmp:DATA=following::fmp:COL[1]/fmp:DATA)]"> <xsl:if test="fmp:COL[1]/fmp:DATA != ''"> <ServiceUser> <xsl:attribute name="RecordId"><xsl:value-of select="fmp:COL[1]/fmp:DATA"/></xsl:attribute> <PersonID> <xsl:value-of select="fmp:COL[1]/fmp:DATA"/> </PersonID> <FirstName> <xsl:value-of select="fmp:COL[2]/fmp:DATA"/> </FirstName> <LastName> <xsl:value-of select="fmp:COL[3]/fmp:DATA"/> </LastName> <xsl:call-template name="servicers_builder"> <xsl:with-param name="i_person_id"><xsl:value-of select="fmp:COL[28]/fmp:DATA" /></xsl:with-param> </xsl:call-template> </ServiceUser> <xsl:variable name="vRecordID"><xsl:value-of select="fmp:COL[28]/fmp:DATA"/></xsl:variable> </xsl:if> </xsl:for-each> </ServiceUsers> </UserProgram> </xsl:template> <xsl:template name="servicers_builder"> <xsl:param name="i_person_id" /> <HolidayDestinations> <!-- ...selecting all the records for this user... --> <xsl:for-each select="fmp:RESULTSET/fmp:ROW[fmp:COL[1]/fmp:DATA = $i_person_id]"> <!-- ...and building a service for each --> <HolidayDestination> <xsl:value-of select="fmp:COL[4]/fmp:DATA" /> </HolidayDestination> </xsl:for-each> </HolidayDestinations> </xsl:template> </xsl:stylesheet> From: Edward.Middleton@xxxxxxxxxxx Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Subject: RE: Please Help IN: SXL Structure problem Date: Fri, 17 Jan 2003 11:50:27 +0900 _________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|

Cart



