Subject: Need to install "XALAN for C" on my windowsOS
Posted By: elayaraja.s Post Date: 7/23/2008 6:36:11 AM
Question1:
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?

Question2:
Is there any difference by running with xalan-C and xalan-J ?
Reply By: samjudson Reply Date: 7/23/2008 6:45:45 AM
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 -/
Reply By: mhkay Reply Date: 7/23/2008 8:15:46 AM
>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
Reply By: elayaraja.s Reply Date: 7/23/2008 11:25:27 PM
i have difference in the xalan-c and xalan-J output , just to print the current date time with defined format as follows,

xalan-c: output:
$xalan ENV24.2302.xml ConvertToASCII.xsl

output:
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...?

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

XSL file:
<?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">

<!-- define current date -->
<xsl:variable name="cDate" select="java:format(java:java.text.SimpleDateFormat.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>
Reply By: samjudson Reply Date: 7/24/2008 2:41:12 AM
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 -/
Reply By: elayaraja.s Reply Date: 7/24/2008 4:21:50 AM
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.SimpleDateFormat.new('E yyyy MM dd hh:mm:ss'),java:java.util.Date.new())"/>
Reply By: samjudson Reply Date: 7/24/2008 4:39:15 AM
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 -/
Reply By: mhkay Reply Date: 7/24/2008 10:17:35 AM
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
Reply By: elayaraja.s Reply Date: 7/24/2008 10:52:47 PM
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.

Go to topic 72993

Return to index page 1