Subject: Re: [xsl] Generating Unique Identifier From: Lighton Phiri <lighton.phiri@xxxxxxxxx> Date: Sat, 22 Oct 2011 22:16:41 +0200 |
Thank you very much; sounds like that might work. Lighton Phiri lighton.phiri@xxxxxxxxxxxxxxxx http://lightonphiri.org/ @lightonphiri On 22 October 2011 22:02, G. Ken Holman <gkholman@xxxxxxxxxxxxxxxxxxxx> wrote: > At 2011-10-22 21:49 +0200, you wrote: >> >> Sorry if my question was not very clearly, but I have two seperate >> stylesheets that each generate html files. > > Oh, that's new. I did not understand you were using two invocations of two > separate stylesheets. Yes, you cannot rely on generate-id() across two > different runs of the XSLT processor (even the same processor, even if the > content of the inputs doesn't change; it may coincidentally be okay for a > particular processor, but then the stylesheet isn't portable). > >> File 1 html output has content that is referenced by File 2 output. >> >> The problem is that I am unable to find a suitable way of generating. >> I was hoping there could perhaps be a way of generating a UNIQUE >> identifier common to both output files other than using generate-id(). > > How about using <xsl:number/> in creating file 1's HTML output, then when > creating file 2's output look up file 2's input value in file 1 and use the > same <xsl:number/> calculation on that file 1 location? > > So, file 1 input has a value, file 1 output names the anchor based on > <xsl:number/>. > > Then, file 2 input has a value, look up that value in file 1, file 2 output > then names the anchor based on <xsl:number/> of that value found in file 1. > > So, you are using only one algorithm, that being file 1's results of > <xsl:number/> but file 2 is exploiting it by looking up its value in file 1. > > I hope this helps. I'm only guessing since in both of your posts you did > not illustrate how each of file 1 and file 2 find or use that which you need > to be common. > > . . . . . . . . . . Ken > > > -- > Contact us for world-wide XML consulting and instructor-led training > Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ > G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx > Google+ profile: https://plus.google.com/116832879756988317389/about > Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Generating Unique Identif, G. Ken Holman | Thread | [xsl] Seek an elegant way to remove, Costello, Roger L. |
Re: [xsl] Generating Unique Identif, G. Ken Holman | Date | Re: [xsl] Seek an elegant way to re, G. Ken Holman |
Month |