xpath - how to convert xslt version 2.0 to version 1.0 -
i using xslt document uses xpath version 2 functions. have xalan 2.6 jar has xslt 1.0 processor, constraint cannot change it..please me if there tools convert xpath 2.0 functions 1.0
<xsl:variable name="var1_clinicaldocument" as="node()?" select="ns0:clinicaldocument"/> <dsmessage> <dspatient> <xsl:for-each select="$var1_clinicaldocument[fn:exists(ns0:id/@root)]"> <source> <xsl:sequence select="fn:string(ns0:id/@root)"/> </source> </xsl:for-each> <demographics> <xsl:for-each select="($var1_clinicaldocument/ns0:recordtarget/ns0:patientrole/ns0:id)[fn:exists(@extension)]"> <externalid> <xsl:sequence select="fn:string(@extension)"/> </externalid> </xsl:for-each> <xsl:for-each select="($var1_clinicaldocument/ns0:recordtarget/ns0:patientrole/ns0:patient/ns0:name/ns0:given/node())[fn:boolean(self::text())]"> <firstname> <xsl:sequence select="fn:string(.)"/> </firstname>
here mapping of xpath 2.0 functions in question:
xpath 2.0 xpath 1.0 xalan-java xslt-c fn:exists() string-length(concat(., ) ) xpath 1.0 xpath 1.0 fn:string() string() xpath 1.0 xpath 1.0 fn:boolean() boolean() xpath 1.0 xpath 1.0
exslt, xsltsl, fxsl, , xpath algorithms can fill in of remaining functionality.
xpath 2.0 fxsl xsltsl exslt xpath 1.0 fn:max maximum math:max fn:max dyn:max fn:min minimum math:min fn:min dyn:min fn:sum sum math:sum sum fn:sum dyn:sum fn:avg sum div count fn:floor floor fn:ceiling ceiling fn:round round fn:abs math:abs fn:collection foldl op:concatenate append fn:doc document fn:count count fn:not not fn:true true fn:false false fn:boolean boolean fn:upper-case str:to-upper fn:lower-case str:to-lower fn:substring substring fn:string-length string-length fn:normalize-space normalize-space fn:translate translate fn:concat str:concat concat fn:substring-before substring-before fn:substring-after substring-after fn:reverse str:backward fn:insert-before str:insert-at fn:matches str:string-match fn:tokenize str:tokenize fn:resolve-uri uri:resolve-uri fn:distinct-values set:distinct op:union | op:intersect set:intersection op:except cmp:diff set:difference op:is-same-node cmp:cmp fn:position node:xpath position fn:last last fn:data node:type fn:lang lang fn:current-datetime date:date-time fn:datetime dt:format-date-time date:format-date fn:year-from-date dt:get-xsd-datetime-year date:day-in-year fn:month-from-datetime dt:get-xsd-datetime-month date:month-name fn:day-from-datetime dt:get-xsd-datetime-day date:day-name fn:hours-from-datetime dt:get-xsd-datetime-hour date:hour-in-day fn:minutes-from-datetime dt:get-xsd-datetime-minute date:minute-in-hour fn:seconds-from-datetime dt:get-xsd-datetime-second date:second-in-minute fn:timezone-from-datetime dt:get-xsd-datetime-timezone if (...) (...) else(...) $dynamic[$var] | $default[not($var)]
references
Comments
Post a Comment