[xslt] xsltproc problem with value-of



hi,

I run xsltproc with:

xsltproc -v -o out.xml --stringparam file customer.xml v2ax.xsl nvpa.vdx 2>
log

the xslt file contains:

- - - - - -  xslt file - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - 

<xsl:stylesheet version = '1.0' xmlns:xsl =
'http://www.w3.org/1999/XSL/Transform' xmlns:vd =
'urn:schemas-microsoft-com:office:visio'>

 <xsl:import href = "diverses.xsl"/>
 <xsl:import href = "header.xsl"/>

 <xsl:param name = "file"     select = "'customer.xml'"/>   
 <xsl:param name = "customer" select = "'XXXX'"/>           
 
 <xsl:variable name = "customerData">
   <xsl:copy-of select = "document( $file )/customers/customer[ @name =
$customer ]"/>
 </xsl:variable>

 <xsl:template match = "/"> 

  <xsl:element name = "AML"> 
	  
    <xsl:call-template name = "Header"/>
    ....
    
  </xsl:element>

 </xsl:template>

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - 

the imported Header.xsl raises errors.

- - - - - -  imported header.xsl file - - - - - - - - - - - - - - - - - - -
- -

22 <xsl:template name = "Header">
23    
24   <xsl:element name = "Header-Info">
25		 
26     <xsl:attribute name = "CreateTime">     
27       <xsl:value-of select =
"$customerData/customer/Header-Info/@CreateTime"/>
28     </xsl:attribute>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - 

this kind is the external data.

- - - - - - with document() imported file - - - - - - - - - - - - - - - - - 

<customers>
 <customer name = "XXXX">
   <Header-Info
      CreateTime     = "23:59:59.999"
      CreateDate     = "04-23-2004"
      DatabaseName   = "XXXX"
      UserName       = "system"
      ArisExeVersion = "61">
   </Header-Info>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - 


I get the errors like this:

- - - - - -  log file - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - 
...
call-template: name Header
applying template 'Header'
xsltValueOf: select $customerData/customer/Header-Info/@CreateTime
Lookup variable customerData
found variable customerData
XPath error : Invalid type
runtime error: file header.xsl line 27 element value-of
xsltValueOf: text copy failed
...
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - 

running the same files with saxon or xalan works.

greetings

michael




This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]