xsl-list
[Top] [All Lists]

Re: [xsl] Transform HTML to XML using XSL

2007-01-19 04:18:48
 Hi Byomokesh,

converting HTML to XML is generally not straightforward:
- for example you have to handle entities, such as ó, with
care: they have to be declared in your document DTD.

If you want to use XSLT to convert your document, you first have to
ensure that your html document conforms to XML and XML namespace
specifications. A good start might be to ensure that your input file
conforms to XHTML.

In order to get more helpful advice, you should also include in later
posts the current state of your XSL stylesheet and explain in more
details what blocking issue you encountered.
Additonally, if you explain the motivation for such a transformation,
we could advise for alternate solutions.

Kind Regards,

Eric Bréchemier

On 1/19/07, Byomokesh wrote:
Hi All,

HTML File
=========
<HTML>
<BODY>
<P align="center"><FONT face="Arial" size="2"><FONT
size="4">Pr&oacute;logo<BR/></FONT><FONT size="5"
color="#FF0000"><I>Comien&ccedil;a Cath&oacute;lica Magestad
delinvict&iacute;ssimo</I> semper</FONT> Emperador de Roma.</FONT></P>
<P align="center"><FONT size="4">Argumento<BR/></FONT><FONT size="5"
color="#FF0000"><I>S&iacute;guese el Argumento del</I></FONT></P>
<P align="center"><FONT size="4">Cap&iacute;tulo I<BR/></FONT><FONT
size="5" color="#FF0000"><I>Marco Aurelio Emperador.</I></FONT></P>
</BODY>
</HTML>

I Want Output
=============
<document>
<chapter id="FM01"><title>Front Matter</title>
<level id="pref01"><title>Pr&oacute;logo</title>
<para><i>Comien&ccedil;a Cath&oacute;lica Magestad
delinvict&iacute;ssimo</i> semper Emperador de Roma.</para>
<-- Some para continue -->
</level>
<level id="pref02"><title>Argumento</title>
<para>S&iacute;guese el Argumento del</para>
</level>
</chapter>
<chapter id="Ch01"><title><label><b>Cap&iacute;tulo I</b></label>
<b>Marco Aurelio Emperador.</b></title>
<!-- then para continue and again chapter start -->
</chapter>
</document>

---------------------

Same tag but i need different condition to xml output.

1. How start and close in chapter and section tag.
2. <BR/> -- tag some cases inline text and some cases need para taging
in base of XML output.

Please anyone help....

Thanks and Regards
Byomokesh


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

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