Solved

What is the next step with XSL?

Posted on 2004-03-26
5
171 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 500 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Google adds suggestions 3 77
RSS Feed Validation 2 78
How to analyze web traffic logs 10 124
php mysql check email already in database. (second check) 7 143
Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

734 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