result document function with SAXON 8.8.
Added by Anonymous over 17 years ago
Legacy ID: #4299312 Legacy Poster: pvallone (pvallone)
Hi, I am recieving an error when using the result document function with SAXON 8.8. <xsl:variable name="fname" select="subsequence(reverse(tokenize(document-uri(.), '//')), 1, 1)"/> <xsl:result-document href="file:///c:/temp/{$fname}"> I am trying to save to to C:\temp{filename here} I get the folloing error: The filename, directory name, or volume label syntax is incorrect net.sf.saxon.trans.DynamicError: Exception thrown by OutputURIResolver Am I allowed to pass a variable to the result document function
Replies (4)
Please register to reply
RE: result document function with SAXON 8.8. - Added by Anonymous over 17 years ago
Legacy ID: #4299358 Legacy Poster: Michael Kay (mhkay)
Your syntax is correct: you can use a variable here. But the content of the variable must be such as to create a legitimate filename. Before the call on result-document, try doing: <xsl:message>Filename: <xsl:value-of select="$fname"/></xsl:message> and tell us what's in the variable
RE: result document function with SAXON 8.8. - Added by Anonymous over 17 years ago
Legacy ID: #4299393 Legacy Poster: pvallone (pvallone)
Hi Michael, The variable returns: file:/C:/temp/210000.xml which would indicate that it is not returning just "210000.xml"
RE: result document function with SAXON 8.8. - Added by Anonymous over 17 years ago
Legacy ID: #4299404 Legacy Poster: pvallone (pvallone)
Ok printing the variable helps in the trouble shooting. I need to change this "subsequence(reverse(tokenize(document-uri(.), '\')), 1, 1)" to work with "file:///" Thanks. Phil "bones"
RE: result document function with SAXON 8.8. - Added by Anonymous over 17 years ago
Legacy ID: #4299440 Legacy Poster: pvallone (pvallone)
Ok..how simple: subsequence(reverse(tokenize(document-uri(.), '/')), 1, 1) worked...
Please register to reply