Subject: Re: [xsl] Problem with embeded XHTML in an XML file and transformation to XSL:FO From: Luuk Jansen <subscribe@xxxxxxxxxxxxxxxxx> Date: Sun, 13 Aug 2006 14:52:34 +0100 |
On Sun, 2006-08-13 at 15:12 +0200, Florent Georges wrote: > But as the argument of saxon:parse() is a string, not a text node, > the only solution I see is to have a string namespace-well-formed: > > <root>&_lt;ns:elem xmlns:ns="doc"/></root> > I added <ns:elem xmlns:ns="doc"/> to the beginning of the text element and am a step further (I think) as it gives me a next error: Error on line 1 column 27 of file:///home/Luuk/workspace/ATFM% 20Solutions/: SXXP0003: Error reported by XML parser: The markup in the document following the root element must be well-formed. Error on line 1048575 of file:///home/Luuk/workspace/ATFM% 20Solutions/xsl/xhtml2fo.xsl: net.sf.saxon.trans.DynamicError: org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed. net.sf.saxon.trans.DynamicError: org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed. Am I just opening a can of worms here? It is probably something basic, but my brain is fried at this stage... The XML parsed is show below, where the content bit is processed with the next part of the stylesheet: <xsl:template match="Content" xmlns:saxon="http://saxon.sf.net/" > <xsl:if test=". != ''"> <fo:block space-after="10mm"> <xsl:variable name="parseContent" select="saxon:parse(.)"/> <xsl:value-of select="$parseContent"/> </fo:block> </xsl:if> </xsl:template> ___ The XML: <?xml version="1.0" encoding="UTF-8"?> <Sections> <Section> <Title>Technical Summary</Title> <IE.SFI.4400> <Content Version="1.0" type="XHTML"><ns:elem xmlns:ns="doc"/><html><head></head><body><bla bla bla class="MsoNormal" style="margin-top: 6pt; text-align: justify; text-indent: 21.25pt; font-family: times new roman;"><font size="3"><span style="font-size: 12pt;"> </span></font></p> <p class="MsoNormal" style="margin-top: 6pt; text-align: justify; text-indent: 21.25pt; font-family: times new roman;"><font size="3"><span lang="EN-GB" style="font-size: 12pt;">bla bla bla &#945;2-bla bla bla &#945;2-bla bla bla.</span><span style="font-size: 12pt;"><o:p></o:p></span></font></p> <p class="MsoNormal" style="margin-top: 6pt; text-align: justify; text-indent: 21.25pt; font-family: times new roman;"><font size="3"><span lang="EN-GB" style="font-size: 12pt;">&#945;2-bla bla bla </span></font><span style="font-size: 12pt;"><font size="3"><span style="font-size: 12pt;" lang="EN-GB">bla bla bla </span></font></span><font size="3"><span lang="EN-GB" style="font-size: 12pt;">groups.</span><span style="font-size: 12pt;"><o:p></o:p></span></font></p> <p class="MsoNormal" style="margin-top: 6pt; text-align: justify; text-indent: 21.25pt; font-family: times new roman;"><font size="3"><span lang="EN-GB" style="font-size: 12pt;">bla bla bla:</span><span style="font-size: 12pt;"><o:p></o:p></span></font></p> <p class="MsoNormal" style="margin-top: 6pt; margin-left: 63.8pt; text-align: justify; text-indent: -35.25pt; font-family: times new roman;"><font size="3"><span lang="EN-GB" style="font-size: 12pt;">1)</span><span lang="EN-GB" style="font-size: 7pt;"> </span><span lang="EN-GB" style="font-size: 12pt;">model the &#945;2-bla bla bla &#8216;<i>in silico</i>&#8217; test &#945;2-adrenoceptor antagonists. </span><span style="font-size: 12pt;"><o:p></o:p></span></font></p> <p class="MsoNormal" style="margin-top: 6pt; margin-left: 63.8pt; text-align: justify; text-indent: -35.25pt; font-family: times new roman;"><font size="3"><span lang="EN-GB" style="font-size: 12pt;">2)</span><span lang="EN-GB" style="font-size: 7pt;"> </span><span lang="EN-GB" style="font-size: 12pt;">bla bla bla </span><span style="font-size: 12pt;"><o:p></o:p></span></font></p> <p class="MsoNormal" style="margin-top: 6pt; margin-left: 63.8pt; text-align: justify; text-indent: -35.25pt; font-family: times new roman;"><font size="3"><span lang="EN-GB" style="font-size: 12pt;">3)</span><span lang="EN-GB" style="font-size: 7pt;"> </span><span lang="EN-GB" style="font-size: 12pt;">evaluate<span style="color: red;"> </span>bla bla bla &#945;2-bla bla bla.</span><span style="font-size: 12pt;"><o:p></o:p></span></font></p> <p class="MsoNormal" style="margin-top: 6pt; text-align: justify; text-indent: 21.25pt; font-family: times new roman;"><font size="3"><span lang="EN-GB" style="font-size: 12pt;">The applicant&#8217; bla bla bla </span><st1:country-region><st1:place><span lang="EN-GB" style="font-size: 12pt;">Ireland</span></st1:place></st1:country-region><span lang="EN-GB" style="font-size: 12pt;"> with such capability.</span><span style="font-size: 12pt;"><o:p></o:p></span></font></p> <p class="MsoNormal" style="margin-top: 6pt; text-align: justify; text-indent: 21.25pt; font-family: times new roman;"><font size="3"><span lang="EN-GB" style="font-size: 12pt;"><o:p></o:p></span></font></p> </body></html></Content> <Attachments Version="1.0"> <Attachment context="" mimeType="" name=""> <Link/> <Comment author="" timestamp=""/> <Property name=""/> </Attachment> </Attachments> </IE.SFI.4400> </Section> </Sections> Tanks again! Luuk
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Problem with embeded XHTM, Florent Georges | Thread | RE: [xsl] Problem with embeded XHTM, Michael Kay |
Re: [xsl] Problem with embeded XHTM, Florent Georges | Date | RE: [xsl] Problem with embeded XHTM, Michael Kay |
Month |