Subject: RE: [xsl] Check for duplicate @id's - collection() From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Sat, 19 Jul 2008 12:24:20 -0400 |
This is a great idea which I currently use the following template for:
<xsl:template name="get-mandatory-id"> <xsl:param name="id-val"/> <xsl:choose> <xsl:when test="string-length($id-val) > 0"> <xsl:value-of select="$id-val"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="generate-id()"/> </xsl:otherwise> </xsl:choose> </xsl:template>
However, I also use some of the IDs for cross-referencing for PDF output and HTML. So generating the id dynamicly is something I can't always do, unless I am missing the obvious?
-- Upcoming XSLT/XSL-FO hands-on courses: Wellington, NZ 2009-01 World-wide corporate, govt. & user group XML, XSL and UBL training RSS feeds: publicly-available developer resources and training G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Check for duplicate @id', Philip Vallone | Thread | Re: [xsl] Check for duplicate @id', Vladimir Nesterovsky |
RE: [xsl] Check for duplicate @id', Philip Vallone | Date | Re: [xsl] Check for duplicate @id', Vladimir Nesterovsky |
Month |