|
Subject:
|
About genarate-id
|
|
Posted By:
|
janedong
|
Post Date:
|
11/14/2004 10:34:21 PM
|
The following is the snippet of my xsl code:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ross="http://www.rossinc.com/TOC.xsd" version="1.0"> <xsl:output method="xml" omit-xml-declaration="yes"/>
......
<xsl:template match="/">
...... <xsl:template match="ross:Menu"> <table cellspacing="0" cellpadding="0"> <xsl:attribute name="class">X</xsl:attribute> <xsl:attribute name="background"><xsl:value-of select="$ThemesPath" />GroupHeader.gif</xsl:attribute> <xsl:attribute name="id">grp<xsl:value-of select="substring-after(generate-id(.),'XSLTMen')" />
......
The problem is : in some computer , the string generated by "generate-id(.)" contains 'XSLTMen' , and some didn't contain .
Can anybody help me for this ? Thanks first!
|
|
Reply By:
|
mhkay
|
Reply Date:
|
11/14/2004 10:49:13 PM
|
The only things you can rely on about generate-id() are that the result is an ASCII string conforming to certain rules, and that the result is different for each distinct node. Apart from that, the returned value depends entirely on which XSLT processor you are using, and may even vary from one run to the next. You appear to be using it for a job that it wasn't designed for.
Michael Kay http://www.saxonica.com/
|
|
Reply By:
|
janedong
|
Reply Date:
|
11/15/2004 2:02:56 AM
|
I see ! Thanks very much !
|