[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

how do I say it for xalan, namespace probs

Subject: how do I say it for xalan, namespace probs
From: Jochen Schroer <schroer@xxxxxxxxxxxxxxx>
Date: Sun, 17 Jun 2007 16:12:44 +0200
 how do I say it for xalan
Hi,

because I need barcodes in my fo-documents I start searching in the
internet and found some nice XSL-files at
http://www.renderx.com/demos/barcodes.html .
The problem is, this xsl-files work fine in my stylus studio and if I
process them with saxon (8.x), but if I try it at my productive system
with xalan 2.7.0 I run into big problems.

I extract the problematic codelines and make a small testfile:
------------------------------------- snipp -----------------------
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:my="3of9-data">
   <xsl:template match="/">
       <xsl:call-template name="char2bar_codec">
           <xsl:with-param name="string">123</xsl:with-param>
       </xsl:call-template>
   </xsl:template>
   <xsl:template name="char2bar_codec">
       <xsl:param name="string"/>
       <xsl:if test="$string">
           <xsl:value-of
select="document('')//my:char2bar/entry[@char=substring($string, 1,
1)]/text()"/>
           <xsl:call-template name="char2bar_codec">
               <xsl:with-param name="string" select="substring($string,
2)"/>
           </xsl:call-template>
       </xsl:if>
   </xsl:template>
   <my:char2bar>
       <entry char="1">1-->100100001 </entry>
       <entry char="2">2-->001100001 </entry>
       <entry char="3">3-->101100000 </entry>
   </my:char2bar>
</xsl:stylesheet>
------------------------------------- snapp ---------------------
The output should be (and is it for example with saxon 8.x):
1-->100100001 2-->001100001 3-->101100000

If I try it with xalan 2.7.0 (xalan-j on windows-xp) I get the following
error:
SystemId Unknown; Line #14; Column #99; A location step was expected
following the '/' or '//' token.
SystemId Unknown; Line #14; Column #99; A relative location path was
expected following the '/' or '//' token.
SystemId Unknown; Line #14; Column #99; Extra illegal tokens:
'3of9-data', ':', 'char2bar', '/', 'entry', '[', '@', 'char', '=',
'substring', '(', '$', 'string', ',', '1', ',', '1', ')', ']', '/',
'text', '(', ')'

The problematical line ist the
"....document('')//my:char2bar/entry[@char=substring($string, 1,
1)]/text()..." construct but I'm not so familiar with XSLT and I have no
idea what I can do that xalan accept this codesnippet.

Kind regards,

Jochen
--

ECS-Solution GmbH   Handelsregister   Geschdftsf|hrer   Prokurist
Raiffeisenstr. 26   Kaiserslautern    Jochen Schrvr     RA Felix Kuntz
67817 Imsbach       HRB 12047         ebenda
Germany
Tel.: +49 (6302) 60971-0    Vom Prdsidenten des Landgerichtes Kaisers-
Fax : +49 (6302) 60971-1    lautern zugelassenes Inkassounternehmen

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.