xsl-list
[Top] [All Lists]

RE: [xsl] problem with unc relative path

2006-06-26 04:29:42
doc-available() returns true() or false(), it never returns empty.

Saxon delegates URI resolution to the Java runtime. I think Java VMs are not
usually very comfortable with URIs based on UNC filenames. It's worth
calling base-uri() to see what is the base URI of the node that the relative
document URI is being resolved against.

You can of course do the resolution yourself in your own URIResolver if this
proves necessary.

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

-----Original Message-----
From: Rick Roen [mailto:Rick(_at_)LakeValleySeed(_dot_)com] 
Sent: 26 June 2006 12:15
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] problem with unc relative path

Win XP sp2 - XSLT 2.0 - FOP trunk using Saxon 8.7.?

I'm having some difficulty resolving the relative file path 
for a document in my transformation when I run from a unc file path.

The problem happens when I run the program from an unmapped 
folder on a remote server, i.e. "\\lvsserver0\lvsapps". The 
program, and the document I am trying to load are both in the 
same folder, but it seems unable to resolve the relative file path.

When I run the same program + file combination from a local 
drive, or from the same server's mapped drive, i.e. 
"z:\lvsapps", no problem, the document loads properly.

How do I get this to resolve properly on an unmapped drive?

See below for details.

Thanks for any suggestions,

Rick

_______________________________________________

Xml fragment:
       <letter-file>Cor_CreditLetter.xml</letter-file>


XSL fragment

      <xsl:if test="empty( doc-available( letter-file ) )">
      <xsl:message select="concat( '==== Unable to locate the 
credit letter file: ', letter-file, ' . See your 
administrator to resolve.' )"
terminate="yes" /> 
      </xsl:if>
      <xsl:for-each select="doc(letter-file)">
       <xsl:apply-templates /> 
      </xsl:for-each>

Error:

SEVERE: Exception
net.sf.saxon.trans.DynamicError: Failed to load document 
Cor_CreditLetter.xml
      at
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:167)
      at 
org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:114)
      at org.apache.fop.cli.Main.startFOP(Main.java:159)
      at org.apache.fop.cli.Main.main(Main.java:190)

---------

; SystemID: file:////Lvsserver0/lvsapps/Cor_CreditLetter.xsl; 
Line#: 195;
Column#: -1
net.sf.saxon.trans.DynamicError: Failed to load document 
Cor_CreditLetter.xml
      at
net.sf.saxon.expr.ComputedExpression.dynamicError(ComputedExpr
ession.java:62
5)


--~------------------------------------------------------------------
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>
--~--



--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>