Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
| Search | Today's Posts | Mark Forums Read
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old November 25th, 2005, 05:19 PM
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

  #2 (permalink)  
Old November 30th, 2005, 05:53 AM
Authorized User
 
Join Date: Oct 2005
Location: , , Philippines.
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Default

can you change your DTD? because I suppose you included your dtd in the new transformed xml file.

  #3 (permalink)  
Old December 1st, 2005, 08:03 AM
Authorized User
 
Join Date: Apr 2005
Location: Chennai, Tamil Nazdu, India.
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

When you are talking about the DTD. How will other users know the DTD and what it has? kindly provide the full DTD and full xml file and the what is your requirements

  #4 (permalink)  
Old December 5th, 2005, 05:36 AM
Authorized User
 
Join Date: Oct 2005
Location: , , Philippines.
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Default

if you could not change the DTD, then there is no solution to your problem.




Similar Threads
Thread Thread Starter Forum Replies Last Post
Display checkbox inside Table like structure in Vb remya1000 General .NET 0 May 15th, 2008 03:59 PM
find all the controls inside any table amartya_mandal ASP.NET 1.0 and 1.1 Professional 10 October 24th, 2006 08:35 AM
Safari not rendering div inside table irjaelisa CSS Cascading Style Sheets 1 July 10th, 2006 10:59 PM
Set font for different word inside a table field android66 Java GUI 0 March 7th, 2006 05:52 AM
How to put a control inside a table cell? zach2004 ASP.NET 1.x and 2.0 Application Design 7 March 8th, 2004 03:28 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.