xsl-list
[Top] [All Lists]

Re: [xsl] commenting an XML element [XSLT 1.0][xsltproc]

2010-08-18 07:41:15
pankaj(_dot_)c(_at_)thomsondigital(_dot_)com wrote:
Thanks everybody for your thoughts.
Martin, just for the brevity below is the snippet of my sample xml, which is a table and <spec/> is actually is <colspec/> (copy pasted from the wrong snippet earlier)

<?xml version="1.0" encoding="UTF-8"?>
<!-- New document created with EditiX at Wed Aug 18 17:37:11 IST 2010 -->
<table id="t0010" frame="topbot" rowsep="0" colsep="0">
<label>Table 3-1</label>
<caption>
<simple-para id="sp0200" role="title">This is a dummy title.</simple-para>
<simple-para id="sp0210">Ranjan</simple-para>
</caption>
<source>Source if present.</source>
<tgroup cols="2">
<colspec colname="col1"/>
<colspec colname="col2"/>
<thead valign="top">
<row>
<entry rowsep="1" align="left">Abbreviation</entry>
<entry rowsep="1" align="left">Dosage Interval</entry>
</row>
</thead>
<!-- More code here -->
</tgroup>
</table>

Stylesheet snippet is same as posted earlier and I just tried using "XALAN" in editix2010sp1 and got the following error.
Error:
==================================
No character data is allowed between top-level elements
No character data is allowed between top-level elements
No character data is allowed between top-level elements
No character data is allowed between top-level elements

Failed to compile stylesheet. 4 errors detected.

If I select the first error it highlights line
<entry rowsep="1" align="left">Dosage Interval</entry>

I don't know that tool but if it failed to compile the stylesheet then it is rather odd that the error should occur in the source document, there seem to be problems with the stylesheet itself, namely character data other than white space between top level elements (i.e. between xsl:template elements or other elements like xsl:output).





--

        Martin Honnen
        http://msmvps.com/blogs/martin_honnen/

--~------------------------------------------------------------------
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>
--~--