|
Subject: [xsl] Generating Unique Identifier From: Lighton Phiri <lighton.phiri@xxxxxxxxx> Date: Sat, 22 Oct 2011 21:26:36 +0200 |
I have two different files that I am using to generate html files. One
of the html files references the other html file using an anchor ( <a
name="uniqueid" /> )
I am looking for a way to generate the unique name. I cannot use
generate-id() as the nodes are located in different files. I have
tried normalising the content, but I end up with duplicates when I try
to replace spaces and other special characters. Any ideas on how best
I can sort this out?
File 1
<file>
<keyword>the-word_</keyword>
<keyword>-the word</keyword>
<keyword>!the&word</keyword>
<resources>
<resource>xxxxx</resource>
<resource>xxxxx</resource>
</resources>
</file>
File 2
<file>
<resource>
<id>xxxxx</id>
<title>xxxxx</title>
<description>xxxxx</
description>
<keywords/>
<key>the-word</key>
<key>-the-word</key>
<key>!the&word</key>
</keyword>
</resource>
</file>
Desired output
<html>
:
<body>
File2 link is <a name="UNIQUEID" />
</body>
:
</html>
I am working with xslt 1.0 and processing using xsltproc.
Lighton Phiri
lighton.phiri@xxxxxxxxxxxxxxxx
http://lightonphiri.org/
@lightonphiri
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] two <xsl:analyze-string> , Brandon Ibach | Thread | Re: [xsl] Generating Unique Identif, G. Ken Holman |
| Re: [xsl] Setting a boolean value, Michael Kay | Date | Re: [xsl] Generating Unique Identif, G. Ken Holman |
| Month |