Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 23rd, 2008, 06:36 AM
Authorized User
 
Join Date: Jul 2008
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Default Need to install "XALAN for C" on my windowsOS

[u]Question1:</u>
I need to install "XALAN for C" on my windows-OS. Did any one done the same. Let me know the intstallation tips and the command to run the XSL file?

[u]Question2:</u>
Is there any difference by running with xalan-C and xalan-J ?
 
Old July 23rd, 2008, 06:45 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

1) Which part of the installation instructions on the Xalan web site are you having problems with?

http://xml.apache.org/xalan-c/install.html

2) They are both XSLT 1.0 processors, so any differences are likely to be bugs, not features.



/- Sam Judson : Wrox Technical Editor -/
 
Old July 23rd, 2008, 08:15 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

>They are both XSLT 1.0 processors, so any differences are likely to be bugs, not features.

But they almost certainly differ in their mechanisms for calling extension functions (e.g. external C or Java code).

It's worth remembering that the Xalan-J bundle includes two separate XSLT processors, originating as the Apache interpreted product and the Sun compiled XSLTC product. There has been a lot of convergence between the two over the years, I believe, but they are still distinct.

Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer's Reference
 
Old July 23rd, 2008, 11:25 PM
Authorized User
 
Join Date: Jul 2008
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i have difference in the xalan-c and xalan-J output , just to print the current date time with defined format as follows,

[u]xalan-c: output:</u>
$xalan ENV24.2302.xml ConvertToASCII.xsl

[u]output:</u>
XalanXPathException: The function number 'http://xml.apache.org/xslt/java:java.text.SimpleDateFormat.new' is not availab
le. (file:///F:/1AW1Contract/BCH542/SEQ0/ConvertToASCII.xsl, line 5, column 138)

Question: Any suggestion how to fix this issues...?

[u]xalan-J: output:</u>
<?xml version="1.0" encoding="UTF-8"?>Thu 2008 07 24 09:49:56

[u]XSL file:</u>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:java="http://xml.apache.org/xslt/java" version="1.0" exclude-result-prefixes="xsl">


<xsl:variable name="cDate" select="java:format(java:java.text.SimpleDateForma t.new('E yyyy MM dd hh:mm:ss'),java:java.util.Date.new())"/>

<xsl:template match="/" >
    <xsl:value-of select="$cDate"/>
</xsl:template>

</xsl:stylesheet>
 
Old July 24th, 2008, 02:41 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

You are trying to use a Java class from within the Xalan C++ processor?

<sarcasm>Strange, I can't think why that wouldn't work...</sarcasm>

/- Sam Judson : Wrox Technical Editor -/
 
Old July 24th, 2008, 04:21 AM
Authorized User
 
Join Date: Jul 2008
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok.
Could you please tell using xalan-C++, how to display the date in the given formatthe as i specified below, , either by adding namesapce... or any link ?

<xsl:variable name="cDate" select="java:format(java:java.text.SimpleDateForma t.new('E yyyy MM dd hh:mm:ss'),java:java.util.Date.new())"/>
 
Old July 24th, 2008, 04:39 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

I've never used Xalan-C++, so the only information I have to go on is what is on their web site.

http://xml.apache.org/xalan-c/extensionslib.html

They possibly support the EXSLT function date-format.

/- Sam Judson : Wrox Technical Editor -/
 
Old July 24th, 2008, 10:17 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

As a matter of interest, why are you trying to install Xalan-C? What are your actual requirements? If you are adopting a new XSLT processor, why not move to XSLT 2.0 - then you will be able to format dates and times (and do many other useful things) without having to call extension functions that vary from processor to another.



Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer's Reference
 
Old July 24th, 2008, 10:52 PM
Authorized User
 
Join Date: Jul 2008
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your valuabe information. But i can't change immediately to xsl-1.0 to xsl- 2.0

Since the production environment uses only Xalan-C with XSL-1.O

To execute in the development environmnet i used Xalan-J now only i come to know that i have to use Xalan-C, its my mistake. Considering the enhancement project, since the code is developed in XSL1.0, hope its not advisable to use XSL2.0 partially. If i am wrong please advice.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Did any one used Xalan-C elayaraja.s XSLT 3 July 24th, 2008 06:19 AM
why xalan extension function ? elayaraja.s XSLT 3 July 17th, 2008 07:03 AM
install saxon instead of xalan li72 XSLT 1 September 5th, 2007 06:59 AM
Xalan bug wpsBoy XSLT 2 December 26th, 2005 06:59 AM
How do you use the -param option of Xalan-J mountainbiker XSLT 0 January 28th, 2004 03:19 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.