Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Generate-id for foreign key - URGENT !

From: Tim Heap <tim@------.--.-->
To: NULL
Date: 3/1/2006 5:22:00 AM
Please help.
I need to be able to generate a unique at one level in my stylesheet,
and copy it into another section.
My XSL is here :

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
	<xsl:output method="xml" omit-xml-declaration="yes"/>
	<!--Generate Site Ids-->
	<!--TH 2002 -->
	<xsl:template match="PanelDetails">
	<!--<xsl:param name="panId" select="generate-id(.)"/>"-->
		<xsl:copy>
			<xsl:element name="panId">
				<xsl:variable name="panId" select="generate-id(.)"/>
				<xsl:value-of select="$panId"/>
			</xsl:element>
			<xsl:apply-templates select="@*|node()"/>
		</xsl:copy>
	</xsl:template>
	<!--Add Generated Site Ids to Panel Records as Foreign Keys-->
	<xsl:template match="BookingDetails">
		<xsl:copy>
			<xsl:element name="panId">
				<xsl:variable name="panId"/>
				<xsl:value-of select="$panId"/>
			</xsl:element>
			<xsl:apply-templates select="@*|node()"/>
		</xsl:copy>
	</xsl:template>
	<xsl:template match="@*|node()">
		<xsl:copy>
			<xsl:apply-templates select="@*|node()"/>
		</xsl:copy>
	</xsl:template>
	
</xsl:stylesheet>

What I need to do is generate a unique key at the panel details levels,
and then add it into another xml file at the booking details level as a
foreign key.

Any ideas welcome

Thanks.

Tim Heap
Software & Database Manager
POSTAR Ltd
www.postar.co.uk
tim@p...

*** Sent via Developersdex http://www.developersdex.com ***


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent