|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Assigning unique id to new node using generate-id(
Kyle,
If you need to keep the IDs you have (which is very common), you should create new IDs according to whatever rules or "business logic" you use to create the IDs in the first place (which presumably addresses their requirement for uniqueness). If you have so far evaded the definition of any such logic, now is the time to tackle the problem, since generate-id() is not well suited for generating, and managing, unique identifiers in such a scenario. This is because generate-id() is explicitly defined to provide values unique only for *one run* of a given stylesheet, and unique only within a set that the processor itself can define (it assigns all of them), whereas you need a value that's unique within a set that includes values already given in the input. I'm sure list members will be happy to suggest their favorite ways of assigning unique ID values across a broad scope that spans many stylesheet runs. What's the best way? It really depends ... unfortunately a really robust solution may have to call some kind of assignment routine outside the XSLT processor, which only sees its own little world. I hope this helps, Wendell At 02:40 PM 8/13/2003, you wrote: Thank you for you reply. ====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ====================================================================== XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








