RE: [xsl] Paragraphs in Word XML

Subject: RE: [xsl] Paragraphs in Word XML
From: Florent Georges <darkman_spam@xxxxxxxx>
Date: Wed, 4 Jan 2006 15:09:44 +0100 (CET)
Kaila Kaarle wrote:

> I have an xml file containing the data for my genealogical
> report. It contains table elements and section elements
> and within sections there are person - relation and
> notices elements.  Notices elements contain notice
> elements with information such as birth dates and places
> but also long texts about what the person did.  The text
> is divided into para elements and some of them must be
> written into separate paragraps in the output.

> Word XML requires that <body> element contains <p>
> (paragraph) elements. When I use XSTL to create my
> document I would usually transform one section in my XML
> into a <p> element in Word XML. But if the text contains
> paragraph marks

  What's a "paragraph mark"?

--drkm


>                 I need to fininsh the current Word
> paragraph and start a new one (with a different style) but
> I don't know if I can do that in XSLT.

> I'll add an example at the end of this message of my xml.

> My xml looks like this: All of it should go to one
> pargraph if the <notice tag="NOTE"> would not contain the
> <para type="NEW"> element.  The rest of the text should go
> to the second paragraph.

> How can I split the text in the example into two different
> elements on output???

> Regards
> Kaarle

>  <tables>
>     <table number="1">
>       <section type="MAIN" gen="1">                 
>         <person sex="M" unitid="I1" source="1">
>           <name>
>             <givenname>Paavo</givenname>
>             <surname>Kaila</surname>
>           </name>
>           <notices>
>             <notice tag="BIRT" text="Syntynyt">
>               <date value="18840413">13.04.1884</date>
>               <place name="Vimpeli">Vimpeli</place>
>             </notice>
>             <notice tag="DEAT" text="Kuollut">
>               <place name="Lappeenranta">Lappeenranta</place>
>             </notice>
>             <notice tag="OCCU">
>               <para>Bonde</para>
>               <place name="Esse">Esse</place>
>             </notice>
>             <notice tag="NOTE">
>               <para>Paavo oli isdni isd. Hdn meni Evan kanssa
> naimisiin mutta oli hdnelld pari kolme muutakin vaimoa. Heitd en ole
> tavannut vaikka viimeinen kuoli vasta muutama vuiosi sitten.
> </para>
>               <para type="NEW">Lisdsin tdhdn vield tdllaisen toisen
> tekstikappaleen. Word-xml testi on nyt testattavana ja siindkin
> pitdisi saada kappaleet paikoilleen. Muuten homma ei oikein suju.
> Myvskin olisi hyvd jos tdmd jatkuisi useammalle riville. Ehkd se jo
> on ohittanut ekan rivin loppusarakkeen.</para>
>             </notice>
>             <notice tag="PHOT">
>               <media name="P1R7.jpg" number="1">Tdmd on Paavo</media>
>             </notice>
>           </notices>
>           <relation type="SPOU" number="1" source="2">
>             <event type="MARR">
>               <date value="1907">1907</date>
>               <place name="Tammerfors">Tammerfors</place>
>             </event>
>             <person sex="F" unitid="I2">
>               <name>
>                 <givenname>Eva Charlotta</givenname>
>                 <surname>Koskinen</surname>
>               </name>
>               <notices>
>                 <notice tag="NAME">
>                   <name>
>                     <givenname>Eva Charlotta</givenname>
>                     <surname>Kaila</surname>
>                   </name>
>                 </notice>
>                 <notice tag="BIRT" text="Syntynyt" source="3">
>                   <date value="18920422">22.04.1892</date>
>                   <place name="Tammela">Tammela</place>
>                 </notice>
>                 <notice tag="DEAT" text="Kuollut">
>                   <date value="19640406">06.04.1964</date>
>                   <place name="Helsinki">Helsinki</place>
>                 </notice>
>               </notices>
>             </person>
>           </relation>
>         </person>
>       </section>
>    </table>
> </tables>



	

	
		
___________________________________________________________________________ 
Nouveau : tiliphonez moins cher avec Yahoo! Messenger ! Dicouvez les tarifs exceptionnels pour appeler la France et l'international.
Tilichargez sur http://fr.messenger.yahoo.com

Current Thread