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 September 25th, 2010, 10:42 AM
Registered User
 
Join Date: Sep 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Aff with label and sup

i have following doubts in xslt,

The affiliation having label or sup to getting following output.

label method

<aff id="AF0001"><label>1</label>Department of Urology, Kalyani Urology Clinic, Erode - 638 011, Tamil Nadu, India</aff>

Output:

1Department of Urology, Kalyani Urology Clinic, Erode - 638 011, Tamil Nadu, India

where 1 superscript position.


sup method:

<aff id="AF0001"><sup>1</sup>Department of Urology, Kalyani Urology Clinic, Erode - 638 011, Tamil Nadu, India</aff>


Output:

AF0001 1 Department of Urology, Kalyani Urology Clinic, 104, Sampath Nagar Main Road, Opp Kongu Kalai Arangam, Erode - 638 011, TamilNadu, India


where AF0001 and 1 superscript position.


How to implement in xslt, pls help.


Thanks in Advance,

Sankar B
 
Old September 25th, 2010, 11:10 AM
Friend of Wrox
 
Join Date: Nov 2007
Posts: 1,243
Thanks: 0
Thanked 245 Times in 244 Posts
Default

It is not clear what you want to achieve respectively what your problem is. Do you want to use XSLT to transform your XML input to HTML and you don't know which HTML element to use for a superscript? Use the sup element http://www.w3.org/TR/html4/struct/text.html#edef-SUP
Code:
<xsl:template match="aff">
  <xsl:apply-templates/>
</xsl:template>

<xsl:template match="aff/label">
  <sup><xsl:apply-templates/></sup>
</xsl:template>

<xsl:template match="aff/sup">
  <xsl:copy>
     <xsl:apply-templates select="../@id | node()"/>
  </xsl:copy>
</xsl:template>
__________________
Martin Honnen
Microsoft MVP (XML, Data Platform Development) 2005/04 - 2013/03
My blog





Similar Threads
Thread Thread Starter Forum Replies Last Post
how to see a label hombre Java Basics 3 March 4th, 2008 06:15 AM
Transparent Label morteza57 C# 5 February 15th, 2008 04:36 PM
mouseover on label msrnivas ASP.NET 1.0 and 1.1 Basics 5 February 8th, 2007 10:27 AM
image in label--HELP lgschulz VB How-To 6 July 30th, 2004 01:14 PM





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