xsl-list
[Top] [All Lists]

RE: newbie question: transforming xml to txt with xslt

2002-10-23 02:53:05
Hello Milena,

I don't know all you requirements but I think XSLT will do the job. Because 
you're new to XML and XSLT I think it would be wise to do some studying.
I strongly recommend you to read the book 'Beginning XSLT' 
(http://www.wrox.com/books/1861005946.htm) written by Jeni Tennison which is an 
ideal XSLT beginners guide and deals with examples about building a TV Guide. I 
learned a lot by using this book.
If I understand what you mean, yes parameter passing is possible.
Which XSLT processor to use depends of a certain number of factors like for 
instance the platform (Os) you're working on, the level of XML standards 
implementation you wish, the performance level you want to achieve (different 
processors use different optimization tricks which will lead to different 
performance for the same stylesheet) etc...
I'm using Saxon (which has a very handy version Instant Saxon). This is a java 
tool and although it's not the fastest XSLT processor (performance is not 
really an issue for me) I like because because it is one of the most complete 
implementations and it's written by Michael Kay which is involved in the XSLT 
standardization process (and I think this is a pro).
Here you can find an overview of XSLT tools: http://xmlsoftware.com (look under 
XSL tools)

Maybe you also want to use an IDE for your development process. Some examples 
of XML/XSLT IDE are XML Spy and Cooktop and Stylus. These can be very useful 
for a beginner.

If you want to compare XSLT processors you can download an XSLT test tool here: 
http://www.netcrucible.com/xslt/xslt-tool.htm

BR,
Gert

-----Original Message-----
From: milena schrevel [mailto:milena_s(_at_)postmaster(_dot_)co(_dot_)uk] 
Sent: woensdag 23 oktober 2002 11:04
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] newbie question: transforming xml to txt with xslt


hi all, 
i want to exctract certain data from a xml-file, which contains programdetails 
of several tv channels (see a examle below), and put it into txt-files (for 
each tv channel one txt-file). the programm should read from the xml file the 
data starting from 6:00 am of the following day till 5:59 am of the day after 
that. 
i am new to xml, xsl/xslt. my question is now, if my problem can be solved with 
xslt only, or if i need another programminglanguage (which one?) for extracting 
data according the time? as there are 22 tv channels, i don´t want to write an 
xsl-file for each of these...is parameterpassing possible with xslt?  which 
tool you would suggest? 
thanks a lot in advance! any kind of help welcome! 
regards, milena schrevel 

xml-file: 
... 
<RESOURCE id="EVENTLIST_XYZ"> 
<EVENTLIST originalnetworkid="1" transportstreamid="1089" serviceid="0x2EE3" 
servicename="XYZ"> 
<EVENT eventid="0x23BB93"> 
<STARTTIME country="deu" date="21.09.2002" time="16:00:00" /> 
<DURATION country="deu" time="01:00" /> 
<SHORTEVENTDESC language="ger"> 
<EVENTNAME>News</EVENTNAME> 
<EVENTTEXT></EVENTTEXT> 
</SHORTEVENTDESC> 
<EVENTGENRE genreid="GENRE_0" /> 
</EVENT> 
</EVENTLIST> 
</RESOURCE> 
... 
example of output.txt : xyz 21.09.2002 16:00:00 News 

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list





 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>