View Single Post
  #1 (permalink)  
Old November 25th, 2005, 05:19 PM
dzisaacs dzisaacs is offline
Authorized User
 
Join Date: Sep 2005
Location: , , .
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default Table inside paragraph

I'm working with an xml material that has tables inside paragraphs

For example
Code:
<para>
   <table>
   <tr>
      <td>Hello</td>
   </tr>
   </table>
</para>

My XSLT for this is:
Code:
<xsl:template match="para">

    <p>
        <xsl:apply-templates/>
    </p>

</xsl:template>

<xsl:template match="table">

    <table>
        <xsl:apply-templates/>
    </table>

</xsl:template>
The <xs:template> match for tr,td is irrelevant to the problem


I'm working with a DTD that doesn't allow me to have tables inside paragraph's, and it sends me an error saying "The element 'p' has invalid child element 'table'".

I can't change the content of the XML, and i need to fix this in my XSLT...but i have no clue of how to fix these...because of the nature of the material this case happens a lot, and i just don't have a clue of how to solve this...

Thank you in advance