I need to create unique id's for DIVs for each instance of <foo>
within each instance of <baras follows. I iterate through both the
bars and foos via <apply-templates/>. I've tried to use position() but
that reflects the current <bar>, not the current <foo>.
========= sample xml ================
<!-- note the there may be other peer elements to the FOOs -->
<root>
<bar>
<foo>blah, blah, blah</foo>
<foo>bebop, smooth, cool, swing, super cool</foo>
</bar>
<bar>
<foo>baroque, classical, modern</foo>
<foo>chicago, delta</foo>
</bar>
</root>
==================================
========= sample html ================
page generated for the first <barinstance:
<html>
<body>
<div id="foo1">blah, blah, blah</div>
<div id="foo2">bebop, smooth, cool, swing, super cool</div>
</body>
</html>
page generated for the second <barinstance:
<html>
<body>
<div id="foo1">baroque, classical, modern</div>
<div id="foo2">chicago, delta</div>
</body>
</html>
================================= 1 1423
In article <8c**********************************@w5g2000prd.g ooglegroups.com>,
David Schwartz <da******@gmail.comwrote:
>I need to create unique id's for DIVs for each instance of <foo> within each instance of <baras follows.
Use generate-id().
If you really need the position of <foowithin the whole document,
you could use count(preceding::foo), but it will be potentially
very slow.
-- Richard
--
Please remember to mention me / in tapes you leave behind. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Tom |
last post by:
Anyone help on this? PHP/MySQL
I have a repeat region displaying records from orders in a CSV format:
CalJoe33,18,08/23/2004,FED EX,PREPAID,WEBSITE,CA,Book,25.95,???
CalJoe33,18,08/23/2004,FED...
|
by: Mothra |
last post by:
Here's what I'm trying to do (kill off old Unix logins):
---------------------
$i=0;
while (<$who>) {
chomp($_);
my @line = split(/\s+/, $_); # Split it into an array
next unless ($line...
|
by: Mike Brearley |
last post by:
I have a counter (alright one I found on asp101.com) that checks for a
session variable to prevent the counter from incrmenting if a user refreshes
the page or returns to the page during the same...
|
by: J. Campbell |
last post by:
Hi everyone. I'm sure that this is common knowledge for many/most
here. However, it was rather illuminating for me (someone learning
c++) and I thought it might be helpful for someone else. I'm...
|
by: brian |
last post by:
Hi, before coming to .NET, I utilized regular expressions mostly in JScript /
JavaScript and also in my favorite text editor: TextPad (www.textpad.com)
I don't know about JScript/JavaScript, but...
|
by: Antanas |
last post by:
The problem is that when AddID is used multiple times in the same
select statement, it returns the same value in all places. How could I
force function AddID to increment OBJECTID sequence?
Here...
|
by: Payson Books |
last post by:
Where can I find some info on grabbing the recordID of the last record,
incrementing it by one, and using the new number in a new record.
|
by: Bas Wassink |
last post by:
Hi there,
Does the ANSI standard say anything about incrementing variables past
their limits ?
When I compile code like this:
unsigned char x = 255;
x++;
printf ( "%d\n", x );
|
by: subramanian100in |
last post by:
I saw this question from www.brainbench.com
void *ptr;
myStruct myArray;
ptr = myArray;
Which of the following is the correct way to increment the variable
"ptr"?
Choice 1 ptr = ptr +...
|
by: subramanian100in |
last post by:
The following portion is from c-faq.com - comp.lang.c FAQ list ·
Question 6.13
int a1 = {0, 1, 2};
int a2 = {{3, 4, 5}, {6, 7, 8}};
int *ip; /* pointer to int */
int (*ap); /* pointer to...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |