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

using {} brackets with xsl:result-document href (Saxon

Subject: using {} brackets with xsl:result-document href (Saxon 7.4)
From: "malcolm macaulay" <malcolm_xslt_list@xxxxxxxxxxx>
Date: Wed, 23 Apr 2003 02:49:44 +1200
xslt brackets
Can someone please explain why I need to use {} bracket in the href of xsl:results-document?

I'm familiar with using {} as a shortcut for writing values into output attributes but I'm not sure why I can't do something like:

<xsl:result-document href="string($vFilePath) ...

Saxon (7.4) gives me the following error:

"the system identifier of the principal output file is unknown"

No doubt I totally misunderstand the {} :-)

Below are some examples of xsk:result-document which have confused me.

Thanks for your help.

cheers

Malcolm

XML:

<?xml version="1.0" encoding="UTF-8"?>
<filesToMake>
	<file path="c:/temp"/>
	<file path="c:/temp/temp"/>
</filesToMake>

XSLT:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<!-- -->
<xsl:variable name="fileSep" select="system-property('file.separator')"/>
<!-- -->
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<!--


This works..

<xsl:template match="file">
<xsl:variable name="vFileName" select="concat( 'file:///' , @path , $fileSep , 'test.xml' )"/>
<xsl:result-document href="{$vFileName}" >
<x>output..</x>
</xsl:result-document>
</xsl:template>
-->
<!--


This does not work.... Saxon says : The system identifier of the principal output file is unknown..

<xsl:template match="file">
<xsl:variable name="vFileName" select="concat( 'file:///' , @path , $fileSep , 'test.xml' )"/>
<xsl:result-document href="$vFileName" >
<x>output..</x>
</xsl:result-document>
</xsl:template>-->
<!--


This works..

<xsl:template match="file">

		<xsl:result-document href="{'file:///'}{@path}{$fileSep}{'test.xml'}"  >
			<x>output..</x>
		</xsl:result-document>
	</xsl:template>
	-->
	<!--

This does not work.... Saxon says : The system identifier of the principal output file is unknown..

<xsl:template match="file">
<xsl:variable name="vFileName" select="concat( 'file:///' , @path , $fileSep , 'test.xml' )"/>
<xsl:result-document href="string($vFileName)" >
<x>output..</x>
</xsl:result-document>
</xsl:template>-->
<!--


	This works...
	-->
	<xsl:template match="file">
		<xsl:result-document href="file:///{@path}\test.xml"  >
			<x>output..</x>
		</xsl:result-document>
	</xsl:template>

<!--

This does not work.... Saxon says : The system identifier of the principal output file is unknown..

<xsl:template match="file">
<xsl:result-document href="concat( 'file:///' , @path , $fileSep , 'test.xml' )">
<x>output..</x>
</xsl:result-document>
</xsl:template>-->
</xsl:stylesheet>






_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



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.