Subject: RE: [xsl] Problem with embeded XHTML in an XML file andtransformation to XSL:FO From: "Michael Kay" <mike@xxxxxxxxxxxx> Date: Sun, 13 Aug 2006 15:28:52 +0100 |
> 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: The input you are passing to the XML parser now contains an ns:elem element followed by an html element. If you typed <ns:elem xmlns:ns="doc"><html/> into a text editor and then tried to parse this as an XML document, you would get exactly the same error. Michael Kay http://www.saxonica.com/ > > 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><bo > dy><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:count > ry-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, Luuk Jansen | Thread | Re: [xsl] Problem with embeded XHTM, andrew welch |
RE: [xsl] Problem with embeded XHTM, Michael Kay | Date | Re: [xsl] Problem with embeded XHTM, Florent Georges |
Month |