[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Glossary Help

Subject: RE: Glossary Help
From: "Shailesh Shinde" <shailesh@xxxxxxxxxxxx>
Date: Sat, 29 Jul 2006 15:22:27 +0530
RE:  Glossary Help

Migrating glossary xsl code to main xsl----which copies source xml to
outputxml with Updates of glossary elements in outputxml, but getting output
with no contents in divisions. Except glossary. What changes will required?

XSL for the same......

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
	<xsl:output method="xml" indent="yes"/>
	<xsl:template match="*">
			<xsl:copy-of select="@*"/>
	<xsl:template match="division">
	<xsl:if test="@type='appendix'">
			<xsl:copy-of select="@*"/>
			<xsl:for-each select="topic">
					<xsl:copy-of select="@*"/>
					<xsl:copy-of select="title"/>
					<xsl:apply-templates select="body"/>
	<xsl:template match="body">
select="p/i/b[not(../../text())]" /-->
			<xsl:apply-templates select="p[not(text())]/i/b"/>
			<xsl:apply-templates select="p/i/b[../../text()]"/>
			<xsl:apply-templates select="p/b[not(../text())]"/>
			<xsl:apply-templates select="p/b[../text()]"/>
	<xsl:template match="p/i/b[not(../../text())]">
			<xsl:value-of select="."/>
	<xsl:template match="p/i/b[../../text()]">
				<xsl:value-of select="."/>
				<xsl:value-of select="../../text()"/>
	<xsl:template match="p/b[not(../text())]">
			<xsl:value-of select="."/>
	<xsl:template match="p/b[../text()]">
				<xsl:value-of select="."/>
				<xsl:value-of select="../text()"/>

-----Original Message-----
From: Michael Kay [mailto:mike@xxxxxxxxxxxx] 
Sent: Saturday, July 29, 2006 2:59 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  Glossary Help

>     <xsl:apply-templates select="p/i/b[not(../../text())]" />

Another example - two in one morning, apparently independent - of the
predicate being moved quite unnecessarily to the last step in a path
expression. Write:

<xsl:apply-templates select="p[not(text())]/i/b" />

Michael Kay

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.