- From: zn p <pzn_04@yahoo.fr>
- Date: Wed, 20 Oct 2004 14:16:41 +0200 (CEST)
- To: www-math@w3.org
- Cc: DSSSList@lists.mulberrytech.com
Hello,
I am trying to convert html files to xml files. I need to nest (copy) subsections in parent sections, and paragraphs in the corresponding sections .
Is it possible to do it with xsl?
Here is an example (knowing that the files are more complex than this):
h1 is the document title, h2 section title, h3 subsection title. <p> should go under the corresponding section, and section (h3) should go under the parent section (h2) in the output xml.
<html>
<body>
<h1>Document Title</h1>
<p>Content of paragraph 1</p>
<h2>Header 2</h2>
<p>First paragraph of section 1</p>
<p>Second paragraph of section 1</p>
<h3>Header 3</h3>
<p>Test de p dans 2eme para 3</p>
<h2>Header 2</h2>
<p>First paragraph of section 2</p>
</body>
</html>
To be converted into:
<document>
<title>Document Title</title>
<paragraph>Content of paragraph 1</paragraph>
<section>
<title>Header 2>/title>
<paragraph>First paragraph of section 1</paragraph>
<paragraph>Second paragraph of section 1</paragraph>
<section>
<title>Header 3</title>
<paragraph>First paragraph of subsection 1</paragraph>
</section>
</section>
<section>
<paragraph> First paragraph of section 2</paragraph>
</section>
</document>
Thanks,
PZN
---------------------------------
Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
Créez votre Yahoo! Mail
Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis.Téléchargez GRATUITEMENT ici !
--0-1846014824-1098274601=:81511
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
<DIV>Hello,<BR> <BR>I am trying to convert html files to xml files. I need to nest (copy) subsections in parent sections, and paragraphs in the corresponding sections .<BR> <BR>Is it possible to do it with xsl?<BR> <BR>Here is an example (knowing that the files are more complex than this):<BR> <BR>h1 is the document title, h2 section title, h3 subsection title. <p> should go under the corresponding section, and section (h3) should go under the parent section (h2) in the output xml.<BR> <BR><html><BR><body><BR><h1>Document Title</h1><BR><p>Content of paragraph 1</p><BR><h2>Header 2</h2><BR><p>First paragraph of section 1</p><BR><p>Second paragraph of section 1</p><BR><h3>Header 3</h3><BR><p>Test de p dans 2eme para 3</p><BR><h2>Header 2</h2><BR><p>First paragraph of section 2</p><BR></body><BR></html><BR> <BR>To
be converted into:<BR><document><BR><title>Document Title</title><BR><paragraph>Content of paragraph 1</paragraph><BR> <section><BR> <title>Header 2>/title><BR> <paragraph>First paragraph of section 1</paragraph><BR> <paragraph>Second paragraph of section 1</paragraph><BR> <section><BR> <title>Header 3</title><BR> <paragraph>First paragraph of subsection
1</paragraph><BR> </section><BR> </section><BR> <section><BR> <paragraph> First paragraph of section 2</paragraph><BR> </section><BR></document><BR> <BR>Thanks,<BR>PZN<BR></DIV><p>
<hr size=1>
Créez gratuitement votre Yahoo! Mail avec <font color="red"><b>100 Mo de stockage !</b></font>
<br><a href="http://fr.rd.yahoo.com/mail/taglines/*http://fr.rd.yahoo.com/evt=25917/*http://fr.rd.yahoo.com/mail/mail_taglines_100/default/*http://fr.benefits.yahoo.com/">Créez votre Yahoo! Mail</a><br><br>
<font color="red"><b>Le nouveau Yahoo! Messenger est arrivé !</b></font> Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis.
<a href="http://fr.rd.yahoo.com/mail/taglines/*http://fr.rd.yahoo.com/evt=26111/*http://fr.rd.yahoo.com/messenger/mail_taglines/default/*http://fr.messenger.yahoo.com">Téléchargez GRATUITEMENT ici !</a>
--0-1846014824-1098274601=:81511--
Received on Wednesday, 20 October 2004 12:28:50 UTC