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 October 30th, 2008, 04:55 AM
Authorized User
 
Join Date: Sep 2008
Posts: 87
Thanks: 1
Thanked 0 Times in 0 Posts
Default changing the place of the tag

Hi,

i have an xml say:

<richtext xmlns:sgx="http://www.lotus.com/dxl">

<par def="3">
    <run>

        CONTACT INFORMATION
    </run>
</par>
<par def="3">
    <run>

        Mary Rachel Yee Alan Lee / Giselle Lau
    </run>
</par>
<par def="3">
    <run>

        Creative Technology Ltd Scotchbrook Communications Pte Ltd
    </run>
</par>

</richtext>


xsl is jus

<xsl:copy-of select="./node()"/>


i want to print as it is but a small replacement

i want my font tag to be ended after the text

for example
this should be
  <run>
      Creative Technology Ltd Scotchbrook Communications Pte Ltd</run>

displayed as

  <run>
      Creative Technology Ltd Scotchbrook Communications Pte Ltd </run>


...........Raj




 
Old October 30th, 2008, 06:07 AM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 291
Thanks: 9
Thanked 29 Times in 29 Posts
Default

copy-of() acts as a deep copy. So when you use copy-of(), it copies everything. If you want to customize your output, then you should use different template rules.
You can also copy all text in xml file except some elements or attributes, etc.

------
Rummy
 
Old October 30th, 2008, 06:14 AM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 291
Thanks: 9
Thanked 29 Times in 29 Posts
Default

Sorry. Take copy-of() as <xsl:copy-of>

------
Rummy
 
Old October 30th, 2008, 08:35 PM
Authorized User
 
Join Date: Sep 2008
Posts: 87
Thanks: 1
Thanked 0 Times in 0 Posts
Default

yeah i know about copy-of but here the ques is to replace the tag






Similar Threads
Thread Thread Starter Forum Replies Last Post
Transform xml to xml changing one tag. surfer97301 XSLT 2 April 21st, 2010 05:14 PM
Changing php variables using the href tag Rayne84 PHP How-To 11 July 12th, 2007 02:47 PM
HTML tag from C# or ASP.NET tag from javascript angshujit ASP.NET 2.0 Basics 3 February 16th, 2007 10:07 AM
place anchor tag around bgImage inside cell?? mat41 HTML Code Clinic 4 January 26th, 2006 07:42 AM
HTML tag vs Body Tag CFGerry BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 1 October 7th, 2005 07:13 AM





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