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

Re: Looking Not Working for No Obvious Reason

Subject: Re: Looking Not Working for No Obvious Reason
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 20 Jun 2007 21:53:35 +0100
Re:  Looking Not Working for No Obvious Reason
> Input data is:..
saved as ek.xml

> The corresponding mapping entry is:
I commented out that entry from your original post and replaced it with
that (just in case there was a weird difference somewhere), and the
function you posted worked for me, see below.

failing user error, other possibility is system bug, I'm using
Saxon 8.9J from Saxonica
ie the latest full release of the basic processor, not a later version
from subversion for example.


<title>Overview and Background</title>


<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema"
     <xsl:variable name="sectionTitleMap" as="document-node()">
   <longtitle>Overview and Background</longtitle>
<!--       <item>
         <longtitle>Overview and Background</longtitle>
         <longtitle>Scope and Scope Exceptions</longtitle>
         <longtitle>Topical Definitions - Glossary</longtitle>

<!--I then have this function to do lookups:-->

     name="func:getShortTitleForSection" as="xs:string">
       <xsl:when test="count($sectionTitleMap//longtitle[. = 
$sectionBaseTitle]) = 1">
         <xsl:sequence select="$sectionTitleMap//item[longtitle[. = 
         <xsl:sequence select="$sectionBaseTitle"/>


<xsl:template match="title">
 Title: <xsl:value-of select="func:getShortTitleForSection(.)"/>


$ saxon8 ek.xml ek.xsl
<?xml version="1.0" encoding="UTF-8"?>
 Title: Background

The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 

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.