[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Text To XML using XSL

Subject: RE: Text To XML using XSL
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 11 Apr 2005 08:39:50 +0100
text to xml using xslt
This is much easier in XSLT 2.0 than in 1.0. I have found that many
text-to-XML applications involve the following stages:

(a) reading the text file using unparsed-text()

(b) splitting it into lines using tokenize()

(c) analyzing (parsing) the content of the lines using xsl:analyze-string
(regular expressions)

(d) grouping the lines into records using xsl:for-each-group

As you see, each stage benefits from new features in XSLT 2.0. All of them
can be done using 1.0 (for example, step (a) can be replaced by passing the
text as a string-valued parameter) but it's much harder work: sufficiently
hard work that it's probably easier to use a different language, such as
Perl.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: N. Ganesh Babu [mailto:ganesh@xxxxxxxxxxxxxxxxxxxxx] 
> Sent: 11 April 2005 05:24
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Text To XML using XSL
> 
> Dear All,
> 
> I am very well know that we can convert XML files into any 
> other files 
> viz. HTML, XHTML, SGML , Text by using XSL. Is it possible to convert 
> Text into XML,HTML using XSL? If yes, please let me know the 
> resources.
> 
> Regards,
> Ganesh

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.