473,398 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Question about possibilities of XSLT / generate unique ID and reuse it

Hello,

I am currently trying to use XSLT for the creation of multiple
HTML-files from a single XML-File.
This HTML-files need to have links to each other.
The following information might be important:
There are some special nodes that will start a new HTML-page
("page-nodes"). Those nodes can be nested.
Those nodes have an attribute "name" which is not necessarily unique.
There are another special nodes that will create a link in one HTML-Page
to another. Those nodes uses the values of the "name"-attribute to
distinguish the special node that is referenced.
Now my problems: I could create unique numbers in the page-nodes with
xsl:number. But I am not able to find out that number again later in a
different template. The problem is not, that I don't know which node is
referenced, but the problem is that I am simply not able to get that
number via xsl:number, because of the way this tag works.

Any hints and ideas are very welcome.

Kind regards,
Daniel Hilgarth

*** Sent via Developersdex http://www.developersdex.com ***
Nov 24 '06 #1
1 3629
Daniel Hilgarth wrote:
I am currently trying to use XSLT for the creation of multiple
HTML-files from a single XML-File.
This HTML-files need to have links to each other.
The following information might be important:
There are some special nodes that will start a new HTML-page
("page-nodes"). Those nodes can be nested.
Those nodes have an attribute "name" which is not necessarily unique.
There are another special nodes that will create a link in one HTML-Page
to another. Those nodes uses the values of the "name"-attribute to
distinguish the special node that is referenced.
Now my problems: I could create unique numbers in the page-nodes with
xsl:number. But I am not able to find out that number again later in a
different template.
If you want a unique id, have you tried the generate-id function
<http://www.w3.org/TR/xslt#function-generate-id>
that XSLT provides? That way you can generate an id from a node and it
is unique. You just need to make sure you pass the same node to the
function when you need the id for a second time.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Nov 25 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Stephanie Stowe | last post by:
I have been out of this group for so long, then 2 questions in one day! Let me give some background on what I am trying to do..... I have an IIS server running ASP apps. I have a Websphere server...
1
by: Patrick Reilly | last post by:
I am trying to implement a better method than I already have to document database schemas with XML, and use XSLT to both generate database DDL statements (CREATE TABLE, etc) and to transform to...
6
by: M.Kamermans | last post by:
I have an XSLT script that has to operate on some particularly nasty XML to turn it into a SQL databse, but 'entries' in the XML aren't actually unique, so their unique identifier is useless. I...
6
by: chonkme | last post by:
Hi, i have a real simple xslt problem but i just cant figure out how to do it by looking at various examples on the net. i have a xml document and in it are some elements with a "result" tag name....
5
by: Fred | last post by:
Not much expertise on XSLT and trying to understand it's uses when creating apps in VS.NET? If I wanted flexibility on the UI (View aspect of M.V.C.): - How does it compare with creating...
4
by: David Blickstein | last post by:
I have an application where I have a shared "method" of selecting a nodeset. The method currently is duplicated everywhere it is needed but I'd like that code to be shared. The method also...
6
by: Mullin Yu | last post by:
hi, i have a web service that has file operations on Windows OS, and there may be a file concurrency issue if only one working directory e.g. c:\working therefore, i want to have a unique sub...
29
by: MP | last post by:
Greets, context: vb6/ado/.mdb/jet 4.0 (no access)/sql beginning learner, first database, planning stages (I think the underlying question here is whether to normalize or not to normalize this...
3
by: Bostonasian | last post by:
I have following original xml : <HealthHistory> <BloodPressure low="80" high="120" TransactionDate="1/1/2007"/> <BloodPressure low="90" high="140" TransactionDate="1/1/2007"/> <BloodPressure...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.