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

RE: output to two files with hyperlinks

Subject: RE: output to two files with hyperlinks
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 25 May 2005 14:33:10 +0100
specifying variable name in hyperlinks
> (1) Im trying to use the <xsl:result-document> function to 
> output some 
> of the results from the processing to a separate output file 
> but get the error :
> 
> ________________
> [SAXON 8.1.1 from Saxonica] Starting transformation ...
> FATAL ERROR: The system identifier of the principal output file is 
> unknown; 

> <xsl:result-document href="parents.xml">

"parents.xml" here is a relative URI. What is it relative to? Most relative
URIs appearing in a stylesheet are relative to the base URI of the
stylesheet. But this was thought to be a bad idea in this case because if a
stylesheet writes several documents then they probably contain relative
links to each other. So relative URIs are defined to be relative to the
"base output URI", which is the place where the principal output tree (if
there is one) will be written. If you invoke Saxon from the command line
without specifying the -o option, the principal output goes to standard out,
which has no known URI, so you get this failure. The answer is to specify
the -o option. (I've fixed this recently so that if -o is not specified,
parents.xml will go in the current directory, if you're executing from the
command line - but not if Saxon is called using the Java API).

> 
> (2) As a side issue I have a variable
> 
>         <xsl:variable name="matchingVals" select="$aVal[for $a in . 
> return $oVal[contains(lower-case(.),lower-case($a))]]"/>
> 
> so if '$aVal' = 'Time' and $oVal= 'hasFeature NextTime Broken' the 
> variable $matchingVals result contains the value 'Time'. 
> Could I obtain 
> the value 'NextTime' instead?

Perhaps you want

select="tokenize($oval)[contains(lower-case(.), lower-case($aVal)]"

Michael Kay
http://www.saxonica.com/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.