xsl-list
[Top] [All Lists]

RE: output to two files with hyperlinks

2005-05-25 06:33:10

(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/



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--