Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

What is the next step with XSL?

Posted on 2004-03-26
5
Medium Priority
?
175 Views
Last Modified: 2010-04-06
Hi,
go to http://www.demo.izi.se/test.asp

what to do next to present this readable in our site? I don´t know what to do with the XSL file end where to put it or is it possible to include a XSL file?


set xmlDoc=CreateObject("Microsoft.XMLDOM")
xmlDoc.async="false"
xmlDoc.load("http://www.demo.izi.se/cat1.xml")

path="//*[@id='100']"
set nodes=xmlDoc.selectNodes(path)

for each x in nodes
  document.write("<xmp>")
  document.write(x.xml)
  document.write("</xmp>")
next
0
Comment
Question by:jenmat
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 1

Expert Comment

by:Cyrrus30
ID: 10690339
Well, once that your XSL file is done, just display your XML object using this syntax:

'You need another XMLDOM (or whatever object you,re using for your XML) object, in wich you load your XSL file. Then:

Response.Write ( objXML.transformNode ( objXSL ) )

I don't know if it's what you're looking for...
0
 

Author Comment

by:jenmat
ID: 10690437
well, i am not really sure how to handle the ID in the XML file to create a proper XSL. Is that something you can provide a start to? The XML contains a lot of data using <categories> and <category> with several IDs. I want to be able to sort out different categories and for example create a menu och select menu. I think i have a start in the above with the "sort out".
0
 
LVL 1

Accepted Solution

by:
Cyrrus30 earned 2000 total points
ID: 10691036
Well, I,m not a XSL guru, I only used it for basic display. Your XSL file contains, for the basic, lines like this:

<xsl:template match="category">
        <span class="title1"><xsl:value-of select="."/></span><br/>
 </xsl:template>

In this exemple, it will display all elements named Category (to follow your exemple), put them in a span with a class named title1, and put a carriage-return after.
The line
<xsl:value-of select="."/> means that it will take all elements named "category". You can be selective here (never did it, so I can't go further onthis).

It's quite simple when you want to apply styles, but if you want sometinh more complicated, like a select (dropdown), I can't help you anymore.. :)
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question