Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
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
 
Old March 31st, 2008, 09:22 PM
Authorized User
 
Join Date: Jan 2008
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default display out of order html elements?

Hi, is it possible to add html style tags to an xml file, and then have those tags be present in the output of a transformation?

Example

Code:
<Article>
  <Title>...</Title>
  <Category>...</Category>
  <Body>
    <p>stuff</p>
    <ol><li>item</li></ol>
    <p>stuff</p>
  </Body>
</Article>
How could I make a style sheet to parse the <p> and <ol> elements as html, and in that order. This is just one example, in some cases there may be img tags as well. Is this even possible to do?

 
Old April 1st, 2008, 02:12 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

Yes it certainly is. Simply use the <xsl:copy-of> or <xsl:copy> instructions (rather than something like the <xsl:value-of> instruction, which wont output the tags).

/- Sam Judson : Wrox Technical Editor -/
 
Old April 1st, 2008, 02:28 AM
Authorized User
 
Join Date: Jan 2008
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sweet! it works better then expected :) Thank you so much!






Similar Threads
Thread Thread Starter Forum Replies Last Post
order of display rajesh_css XSLT 3 October 21st, 2008 10:17 PM
Remove orphaned html elements from html string pauliehaha C# 2008 aka C# 3.0 2 June 30th, 2008 09:40 AM
Using xml elements as html attributes chipmaster XSLT 4 June 26th, 2007 10:22 AM
order elements of list box Vince_421 Access VBA 2 April 28th, 2007 11:18 AM
Default Namespace does not display elements. AjayLuthria XSLT 2 April 17th, 2007 10:11 AM





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