Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #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

Reply With Quote
  #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.

Reply With Quote
  #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

Reply With Quote
  #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.


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 12:17 PM.


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