Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
|
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 14th, 2004, 11:34 PM
Authorized User
 
Join Date: Nov 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default About genarate-id

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!

 
Old November 14th, 2004, 11:49 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

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/
 
Old November 15th, 2004, 03:02 AM
Authorized User
 
Join Date: Nov 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I see ! Thanks very much !






Similar Threads
Thread Thread Starter Forum Replies Last Post
'this.ID = id;' in class construction holf BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 October 6th, 2006 10:58 AM
How to genarate Uniqe Random numbers KamalRaturi ASP.NET 1.0 and 1.1 Basics 0 September 24th, 2006 02:08 PM
ID crmpicco HTML Code Clinic 5 February 10th, 2005 11:50 AM
why not index.asp?id=1 can be www.myweb.com/?id=1 BurhanKhan Classic ASP Professional 11 September 6th, 2004 02:06 PM
Most recent ID Colonel Angus SQL Server 2000 6 March 31st, 2004 09:54 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.