XML/XSLT/HTML Q?

LiamC

Storage Is My Life
Joined
Feb 7, 2002
Messages
2,016
Location
Canberra
I seem to need a lot of help these days—or SF is a really good resource :wink:

I need to create a HTML document from XML/XSL/XSLT, but the HTML needs to create a variable number of <div> tags—that can be hidden or displayed (via Javascript) when a user clicks on an object (small gif).

Does anybody know a way to do this? The catch with <divs> is that they need an identifier of sorts, ie

<div id="identifier1">

which means you have to know beforehand how many you have, but with XML, this may not be known.


The XML would look something like this
<XMLrecord>
<CustData>
</CustData>
<someothertag>
</someothertag>
<docData>
<docElem>
..
..
</docElem>
</docData>
</XMLRecord>

There will be a variable number of <DocElem> tags. The HTML doc would display a simple list, which, when a list item is clicked would display the XML/HTML for that item only

Anybody know a way to do this? Help, pointers?

TIA
 

Buck

Storage? I am Storage!
Joined
Feb 22, 2002
Messages
4,514
Location
Blurry.
Website
www.hlmcompany.com
Sorry Liam, I have no experience with XML. However, I would recommend that you visit the W3CSchools and check out all of their XML tutorials. Once I read your question, I went to their site and began reading through the tutorial on XSL and could see that they might be able to help or at least give you a good start.
 

Handruin

Administrator
Joined
Jan 13, 2002
Messages
13,916
Location
USA
Can you count the items in the XML with a server side scripting language and then return this information to help you with your task? I don't fully understand what you are trying to do, so I'm not much help. :(

I haven't used XSLT for anything, so I don't know its capabilities. Does it have the ability to generate the information you need. It sounds like you need a way to loop through information and increment the id value.
 

LiamC

Storage Is My Life
Joined
Feb 7, 2002
Messages
2,016
Location
Canberra
Thanks for the suggestions Will. I already have the XSLT PR 2nd ed.

Buck good link.

Handy, yeah XSL can loop & count, but it is eluding me at the mo. I am a lot closer though.
 
Top