Re: [xsl] Text To XML using XSL

Subject: Re: [xsl] Text To XML using XSL
From: "N. Ganesh Babu" <ganesh@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 11 Apr 2005 16:37:22 +0530
Hello James,

Basically I want to convert the citations at the end of the books into XML formats. This citations includes book citations, journal citation and some other. I am trying with Regular expressions to convert to XML through Perl. But I am not a good programmer. It is getting converted but little difficult. some of the cases I can not. Still I am looking for solutions. I am giving some sample Text and XML Cases. These are some of the examples, we will be having 50 varities with in the book citations itself.


1. B H. J. Eichler, P. G&#x0123;nter, and D. W. Pohl, <I>Laser-Induced Dynamic Gratings</I> (Springer, Berlin, 1986).

2. B J. D. Ferry, <I>Viscoelastic Properties of Polymers,</I> 3rd ed. (Wiley, New York, 1980).

3. B B. E. Conway, in <I>Modern Aspects of Electrochemistry,</I> edited by J. O. M. Bockris and B. E. Conway (Butterworths, London, 1964), p. 43.


1. <book><refauth><fname>H.</fname><middlename>J.</middlename><surname>Eichler</surname></refauth> <refauth><fname>P.</fname><surname>G&#x0123;nter</surname></refauth> and <refauth><fname>D.</fname><middlename>W.</middlename><surname>Pohl</surname></refauth> <booktitle>Laser-Induced Dynamic Gratings</booktitle>, (<publisher>Springer</publisher>, Berlin, <date>1986</date>)

2. <book><refauth><fname>J.</fname><middlename>D.</middlename><surname>Ferry</surname></refauth> <booktitle>Viscoelastic Properties of Polymers,</booktitle><edition>3rd ed.</edition>, (<publisher>Wiley</publisher>, New York, <date>1980</date>)

3. <book><refauth><fname>B.</fname><middlename>E.</middlename><surname>Conway</surname></refauth> in <booktitle>Modern Aspects of Electrochemistry,</booktitle> edited by <editor><fname>J.</fname><middlename>O.</middlename> <middlename>M.</middlename><surname>Bockris</surname></editor>and <editor><fname>B.</fname><middlename>E.</middlename><surname>Conway</surname></editor>, (<publisher>Butterworths</publisher>, London, <date>1964</date>), p. <pages>43</pages>

Thanks and Regards, Ganesh

James Fuller wrote:

N. Ganesh Babu wrote:

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.

Hello Ganesh,

this is a fairly general question, with the answer being mainly
yes...and no depending on circumstances.

the xsl:output method determines format of output and the document()
function is used to bring in external files...with some limited success
it is possible to process text in XSLT 1.0.

XSLT 2.0 is much better at bringing in irregular text, with its regular
expression capabilities and unparsed-text() function
(check out

I would suggest asking your question again, though with some
specifics...and perhaps example xml(or text in your case).

--Jim Fuller

Current Thread