XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
David ReesSubject: document() fails with XalanJ
Author: David Rees
Date: 19 May 2004 12:24 AM
It seems in 5.1 (specifically 5.1, build173l) that the document() function doesn't seem to be working under the Java processors. Using following XSL the nodes of b show up under built-in, .NET, MSXML, and my external Xalan processor. However, they do not show up under XalanJ, Saxon 6 or Saxon 7.


As far as I can tell this is exactly how I did things under SS 4.6. Am I missing something?

The XSL is below and two source files are below and attached.


thanks,

d



****** C:\temp\ssXJProblem\test.xsl
<?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:param name="bPath">file://C:\temp\ssXJProblem\b.xml</xsl:param>
<xsl:variable name="bDoc" select="document($bPath)" />

<xsl:template match="/">
<c>
<xsl:copy-of select="/" />
<xsl:copy-of select="$bDoc//*" />
</c>
</xsl:template>

</xsl:stylesheet><!-- Stylus Studio meta-information - (c)1998-2004. Sonic Software Corporation. All rights reserved.
<metaInformation>
<scenarios ><scenario default="yes" name="a" userelativepaths="yes" externalpreview="no" url="a.xml" htmlbaseurl="" outputurl="" processortype="xalan" profilemode="0" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/></scenarios><MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
</metaInformation>
-->

****** C:\temp\ssXJProblem\a.xml
<a/>

****** C:\temp\ssXJProblem\b.xml

<b/>


DocumentssXJProblem.zip
XSL and source files

Postnext
Ivan PedruzziSubject: RE: document() fails with XalanJ
Author: Ivan Pedruzzi
Date: 19 May 2004 12:50 AM
David,

The syntax you are using is not accepted by the java runtime
(java.net.URL class)

Change

file://C:\temp\ssXJProblem\b.xml

to

file:///C:/temp/ssXJProblem/b.xml

It should works

Ivan


> -----Original Message-----
> From: stylus-studio-tech Listmanager
[mailto:stylus-studio-tech.listmanager@stylusstudio.com]
> Sent: Wednesday, May 19, 2004 12:41 AM
> Subject: document() fails with XalanJ
>
> From: David Rees
>
> It seems in 5.1 (specifically 5.1, build173l) that the document()
function doesn't seem to be working
> under the Java processors. Using following XSL the nodes of b show up
under built-in, .NET, MSXML,
> and my external Xalan processor. However, they do not show up under
XalanJ, Saxon 6 or Saxon 7.
>
>
> As far as I can tell this is exactly how I did things under SS 4.6. Am
I missing something?
>
> The XSL is below and two source files are below and attached.
>
>
> thanks,
>
> d
>
>
>
> ****** C:\temp\ssXJProblem\test.xsl
> &lt;?xml version='1.0'?&gt;
> &lt;xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
>
> &lt;xsl:param
name="bPath"&gt;file://C:\temp\ssXJProblem\b.xml&lt;/xsl:param&gt;
> &lt;xsl:variable name="bDoc" select="document($bPath)" /&gt;
>
> &lt;xsl:template match="/"&gt;
> &lt;c&gt;
> &lt;xsl:copy-of select="/" /&gt;
> &lt;xsl:copy-of select="$bDoc//*" /&gt;
> &lt;/c&gt;
> &lt;/xsl:template&gt;
>
> &lt;/xsl:stylesheet&gt;&lt;!-- Stylus Studio meta-information -
(c)1998-2004. Sonic Software
> Corporation. All rights reserved.
> &lt;metaInformation&gt;
> &lt;scenarios &gt;&lt;scenario default="yes" name="a"
userelativepaths="yes" externalpreview="no"
> url="a.xml" htmlbaseurl="" outputurl="" processortype="xalan"
profilemode="0" urlprofilexml=""
> commandline="" additionalpath="" additionalclasspath=""
postprocessortype="none"
> postprocesscommandline="" postprocessadditionalpath=""
> postprocessgeneratedext=""/&gt;&lt;/scenarios&gt;&lt;MapperInfo
srcSchemaPathIsRelative="yes"
> srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot=""
destSchemaPathIsRelative="yes"
> destSchemaInterpretAsXML="no"/&gt;
> &lt;/metaInformation&gt;
> --&gt;
>
> ****** C:\temp\ssXJProblem\a.xml
> &lt;a/&gt;
>
> ****** C:\temp\ssXJProblem\b.xml
>
> &lt;b/&gt;
>
>
>
> --
> Attachment:
> http://www.stylusstudio.com/SSDN/upload/ssXJProblem.zip (1KB)
> XSL and source files
>
>
> --
> To reply: mailto:stylus-studio-tech.7483@stylusstudio.com
> To start a new topic: mailto:stylus-studio-tech@stylusstudio.com
> To login: http://www.stylusstudio.com/SSDN/
> To (un)subscribe:
mailto:stylus-studio-tech.list-request@stylusstudio.com
>

Posttop
David ReesSubject: RE: document() fails with XalanJ
Author: David Rees
Date: 19 May 2004 12:59 AM
Ah, the hidden hostname. Wonder why it worked (or why I think it worked ;) in 4.6.

thanks!

d

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.