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 December 13th, 2010, 07:52 AM
Authorized User
 
Join Date: Nov 2010
Posts: 50
Thanks: 0
Thanked 1 Time in 1 Post
Default Italic missing

Hi,

Please find the below xml file. The footnote inside emph element not show in html . we convert xml to html using xsl, the emph conversion written in xsl, but emph missing for footnote.

XML File

<decision.unit module.type="20" bna.case.id="91" decision.date="02" decision.type="federal" tribunal="ACC">
<agency.case agency.acronym="ACC" bna.case.id="81" document.num="DA 10-2040" agency.doc.id="ACC\DA-10">
<short.name>Total Call Mobile, Inc.</short.name>
<agency.case.annotation>
<decision.num>DA 10-2040</decision.num>
<agency.tribunal acronym="ACC">ACCORDING Communications Commission</agency.tribunal>
<head>Total Call Mobile, Inc.</head>
<decision.date day="02" month="11" year="2010">November 2, 2010</decision.date>
</agency.case.annotation>
<agency.opinion>
<head>ORDER</head>
<head>Adopted: Decmber 25, 2010</head>
<p>By the Chief</p>
<head>I INTRODUCTION</head>
<p>1. In this <emph>Notice of Apparent Liability for Forfeiture</emph>(&ldquo;<emph>NAL</emph>&rdquo;), we find that Total Call Mobile, Inc. (&ldquo;TCM&rdquo;), a reseller of mobile wireless services,<footnote><footnote.marker><superior>1</superior></footnote.marker><footnote.text><p>Total Call Mobile, Section 214 authorizations.</p></footnote.text></footnote> apparently <footnote><footnote.marker><superior>2</superior></footnote.marker><footnote.text><p>47 C.F.R. &sect; 20.19(i)(1).</p></footnote.text></footnote> and apparently. <footnote><footnote.marker><superior>3</superior></footnote.marker><footnote.text><p><emph>47 C.F.R. &sect; 20.19(h).</emph></p></footnote.text></footnote> For these apparent violations, we propose a forfeiture in the amount of twelve thousand dollars ($12,000). We also direct TCM to file the required wireless handset hearing aid compatibility status report within thirty (30) days of the release of this NAL.</p>
<head>II BACKGROUND</head>
<p>2. In the 2003 </p>
</agency.opinion>
</agency.case>
</decision.unit>

XSL Coding
<xsl:template match="//agency.opinion/head">
<h2 align="centre"><xsl:value-of select="."/></h2>
</xsl:template>

<xsl:template match="*/emph">
<span style="color:blue;"><i><xsl:value-of select="."/></i></span>
</xsl:template>
<xsl:template match="*/emph[@face]">
<b color="green"><xsl:value-of select="."/></b>
</xsl:template>

<!-- footnote[1]/footnote.marker[1]/superior[1] -->
<xsl:template match="//footnote/footnote.marker/superior">
<sup><xsl:value-of select="."/></sup>
</xsl:template>

<!-- footnote.text[1]/p[1] -->
<xsl:template match="footnote.text/p">
<span style="color:red;"><xsl:value-of select="."/></span>
</xsl:template>
<xsl:template match="agency.opinion/p">
<p style="text-indent: 30pt;"><xsl:apply-templates/></p>
</xsl:template>

<!--/decision.unit/agency.case[1]/agency.case.annotation[1]/agency.tribunal[1]-->
<xsl:template match="//agency.case.annotation/agency.tribunal">
<p><xsl:apply-templates/></p>
</xsl:template>

<xsl:template match="//p/text/footnote">
<span style="color:#FF000B"> <xsl:value-of select="."/></span>
</xsl:template>



HTML Output
<html xmlns:std="http://xml.com/xslt-extensions" xmlns:axsl="http://www.w3.org/1999/XSL/TransformAlias" xmlns:saxon="http://saxon.sf.net/" xmlns:lnvxe="http://www.lexis-nexis.com/lnvxe" xmlns:lnv="http://www.lexis-nexis.com/lnv" xmlns:lnvni="http://www.lexis-nexis.com/lnvni" xmlns:lnclx="http://www.lexis-nexis.com/lnclx" xmlns:lncle="http://www.lexis-nexis.com/lncle" xmlns:lndel="http://www.lexis-nexis.com/lndel" xmlns:lngntxt="http://www.lexis-nexis.com/lngntxt" xmlns:lndocmeta="http://www.lexis-nexis.com/lndocmeta" xmlns:lnlit="http://www.lexis-nexis.com/lnlit" xmlns:lnci="http://www.lexis-nexis.com/lnci" xmlns:nitf="urn:nitf:iptc.org.20010418.NITF" xmlns:lnvx="http://www.lexis-nexis.com/lnvx" xmlns:ci="http://www.lexis-nexis.com/ci" xmlns:glp="http://www.lexis-nexis.com/glp" xmlns:case="http://www.lexis-nexis.com/glp/case" xmlns:jrnl="http://www.lexis-nexis.com/glp/jrnl" xmlns:comm="http://www.lexis-nexis.com/glp/comm" xmlns:cttr="http://www.lexis-nexis.com/glp/cttr" xmlns:dict="http://www.lexis-nexis.com/glp/dict" xmlns:dig="http://www.lexis-nexis.com/glp/dig" xmlns:docinfo="http://www.lexis-nexis.com/glp/docinfo" xmlns:frm="http://www.lexis-nexis.com/glp/frm" xmlns:in="http://www.lexis-nexis.com/glp/in" xmlns:leg="http://www.lexis-nexis.com/glp/leg" xmlns:xhtml="http://www.w3c.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ASCII">

<title>Agency Case:</title><style>
BODY, P { font-family: Georgia ; font-size: 10pt }
H2,H3,H4,H5 { color: Darkgreen; font-weight: bold; }
H2 { font-size: 13pt; }
H3 { font-size: 12pt; }
H4 { font-size: 10pt; color: black; }
PRE { BACKGROUND-COLOR: #FBEDBB; FONT-FAMILY: "Courier New", Courier, mono; WHITE-SPACE: pre; }
CODE { COLOR: #990000; FONT-FAMILY: "Courier New", Courier, mono; }
sc {font-variant: small-caps;}
fc { text-transform: uppercase }
</style></head>
<body bgcolor="#ffffff">
<p></p>
<h2 align="center">Agency Case:</h2>
<table border="all" border-color="#000000" cellspacing="0" cellpadding="5" width="100%">
<tr>
<td colspan="2" align="center">Decision.Date:<br>02
</td>
<td colspan="2" align="center">bna.case.id:<br>November 2, 2010
</td>
<td align="center"></td>
</tr>
<tr bgcolor="#9acd32">
<th colspan="4">FCC Doc-NUM</th>
</tr>
<tr>
<td colspan="2" align="center">Doc.NUM:<br>DA 10-2040
</td>
<td align="center">Doc-Num:<br>ACC\DA-10
</td>
<td align="center">Docket-Num:<br></td>
</tr>
</table><script type="text/javascript" src="wz_tooltip.js"></script>
<p><i>Total Call Mobile, Inc.</i></p>
DA 10-2040
<p>ACCORDING Communications Commission</p>
<p><b>Total Call Mobile, Inc.</b></p>
November 2, 2010
<h2 align="centre">ORDER</h2>
<h2 align="centre">Adopted: Decmber 25, 2010</h2>
<p style="text-indent: 30pt;">By the Chief</p>
<h2 align="centre">I INTRODUCTION</h2>
<p style="text-indent: 30pt;">1. In this <span style="color:blue;"><i>Notice of Apparent Liability for Forfeiture</i></span>(“<span style="color:blue;"><i>NAL</i></span>”), we find that Total Call Mobile, Inc. (“TCM”), a reseller of mobile wireless services,<sup>1</sup><span style="color:green;">Total Call Mobile, Section 214 authorizations.</span> apparently <sup>2</sup><span style="color:green;">47 C.F.R. § 20.19(i)(1).</span> and apparently. <sup>3</sup><span style="color:red;">47 C.F.R. § 20.19(h).</span> For these apparent violations, we propose a forfeiture in the amount of twelve thousand dollars ($12,000). We also direct
TCM to file the required wireless handset hearing aid compatibility status report within thirty (30) days of the release of
this NAL.
</p>
<h2 align="centre">II BACKGROUND</h2>
<p style="text-indent: 30pt;">2. In the 2003 </p>
</body>
</html>

The emph is missing in footnote no 3.

Kindly solution for this.
 
Old December 14th, 2010, 12:18 PM
Friend of Wrox
 
Join Date: Nov 2007
Posts: 1,243
Thanks: 0
Thanked 245 Times in 244 Posts
Default

Consider to indent your code samples and then mark them up with http://p2p.wrox.com/misc.php?do=bbcode#code so that we can better read them.
If you have elements you want to transform then you shouldn't use xsl: value-of in a parent or ancestor element, instead you should use
Code:
<xsl:apply-templates/>
to ensure the processing continues with any child nodes you want to apply templates to.
__________________
Martin Honnen
Microsoft MVP (XML, Data Platform Development) 2005/04 - 2013/03
My blog





Similar Threads
Thread Thread Starter Forum Replies Last Post
Must be missing something cycokris BOOK: Professional XMPP Programming with JavaScript and jQuery 2 December 5th, 2010 07:57 PM
convert text to bold/italic/underline arunkhushi General .NET 0 August 21st, 2007 04:07 PM
Is there some ':, missing ??? saban SQL Server ASP 1 May 28th, 2007 06:32 AM
Stripping out extra space around an italic word simone_s XSLT 2 April 25th, 2006 03:50 AM
PHP GD - how to write bold and/or italic text starsol Beginning PHP 0 October 4th, 2005 03:12 AM





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