XSLT Warning in XML transformer stage
Posted: Tue Mar 08, 2011 10:56 am
Hi ,
I am getting the following warnings in the XML stage,
FeedScript,0: XSLT Warning: The element xsl:sequence is an unknown XSLT element. (, line 9, column 254.)
FeedScript,0: Error: The function 'if' was not found.
expression = 'if ( $SV_BaseOutputFileName ) then $SV_BaseOutputFileName else 'FEED_SCRIPT'' Remaining tokens are: ('if' '(' '$' 'SV_BaseOutputFileName' ')' 'then' '$' 'SV_BaseOutputFileName' 'else' ''FEED_SCRIPT'')
I simplified the original job so that it is as below :
A Flat file input ( one column of string) and an XML stage and then Flat File output ( one column of string).
There is an XSLT transformation in the XML stage
here is my XML input
<?xml version="1.0" encoding="UTF-8" ?><NOTIFICATION><Parameter><BatchID>1451</BatchID><StartDateTime>2010-11-10 11:25</StartDateTime><EndDateTime>2010-11-10 11:42</EndDateTime><ManualDataFile>1</ManualDataFile><UseValidationFailedFile>0</UseValidationFailedFile><FillInMissingObservations>0</FillInMissingObservations><FillInMissingObservationsWithValue>0</FillInMissingObservationsWithValue><ReportOnMissingValues>0</ReportOnMissingValues><PerformPlausibilityCheck>1</PerformPlausibilityCheck><PerformZeroCheck>0</PerformZeroCheck><RejectIfFailedZeroCheck>0</RejectIfFailedZeroCheck><AlwaysOverrideHistory>0</AlwaysOverrideHistory><AlwaysCreateVintage>0</AlwaysCreateVintage><PerformHistoricalUpdatesCheck>1</PerformHistoricalUpdatesCheck><AllowHistoricalUpdates>1</AllowHistoricalUpdates></Parameter><File><FileNotFound>DataFeedPrefix</FileNotFound></File></NOTIFICATION>
here is the first 10 lines of the XSLT tranformation text.
<!--Designed and generated by Altova StyleVision Enterprise Edition 2011 rel. 2 - see http://www.altova.com/stylevision for more information.-->
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:altova="http://www.altova.com" xmlns:altovaext="http://www.altova.com/xslt-extensions" xmlns:clitype="clitype" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:iso4217="http://www.xbrl.org/2003/iso4217" xmlns:ix="http://www.xbrl.org/2008/inlineXBRL" xmlns:java="java" xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:sps="http://www.altova.com/StyleVision/user-xpath-functions" xmlns:xbrldi="http://xbrl.org/2006/xbrldi" xmlns:xbrli="http://www.xbrl.org/2003/instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<xsl:output version="4.0" method="html" indent="no" encoding="UTF-8" use-character-maps="spaces" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" doctype-system="http://www.w3.org/TR/html4/loose.dtd"/>
<xsl:character-map name="spaces">
<xsl:output-character character=" " string=" "/>
</xsl:character-map>
<xsl:param name="SV_OutputFormat" select="'HTML'"/>
<xsl:param name="SV_BaseOutputFileName" as="xs:string?">
<xsl:sequence select="for $i in altovaext:get-base-output-uri(), $j in tokenize( $i, '[/\\]' )[last()] return replace( $j, '\.[^\.\s#%;]*$', '' )" use-when="function-available('altovaext:get-base-output-uri')"/>
</xsl:param>
.....
...
I am getting the following warnings in the XML stage,
FeedScript,0: XSLT Warning: The element xsl:sequence is an unknown XSLT element. (, line 9, column 254.)
FeedScript,0: Error: The function 'if' was not found.
expression = 'if ( $SV_BaseOutputFileName ) then $SV_BaseOutputFileName else 'FEED_SCRIPT'' Remaining tokens are: ('if' '(' '$' 'SV_BaseOutputFileName' ')' 'then' '$' 'SV_BaseOutputFileName' 'else' ''FEED_SCRIPT'')
I simplified the original job so that it is as below :
A Flat file input ( one column of string) and an XML stage and then Flat File output ( one column of string).
There is an XSLT transformation in the XML stage
here is my XML input
<?xml version="1.0" encoding="UTF-8" ?><NOTIFICATION><Parameter><BatchID>1451</BatchID><StartDateTime>2010-11-10 11:25</StartDateTime><EndDateTime>2010-11-10 11:42</EndDateTime><ManualDataFile>1</ManualDataFile><UseValidationFailedFile>0</UseValidationFailedFile><FillInMissingObservations>0</FillInMissingObservations><FillInMissingObservationsWithValue>0</FillInMissingObservationsWithValue><ReportOnMissingValues>0</ReportOnMissingValues><PerformPlausibilityCheck>1</PerformPlausibilityCheck><PerformZeroCheck>0</PerformZeroCheck><RejectIfFailedZeroCheck>0</RejectIfFailedZeroCheck><AlwaysOverrideHistory>0</AlwaysOverrideHistory><AlwaysCreateVintage>0</AlwaysCreateVintage><PerformHistoricalUpdatesCheck>1</PerformHistoricalUpdatesCheck><AllowHistoricalUpdates>1</AllowHistoricalUpdates></Parameter><File><FileNotFound>DataFeedPrefix</FileNotFound></File></NOTIFICATION>
here is the first 10 lines of the XSLT tranformation text.
<!--Designed and generated by Altova StyleVision Enterprise Edition 2011 rel. 2 - see http://www.altova.com/stylevision for more information.-->
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:altova="http://www.altova.com" xmlns:altovaext="http://www.altova.com/xslt-extensions" xmlns:clitype="clitype" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:iso4217="http://www.xbrl.org/2003/iso4217" xmlns:ix="http://www.xbrl.org/2008/inlineXBRL" xmlns:java="java" xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:sps="http://www.altova.com/StyleVision/user-xpath-functions" xmlns:xbrldi="http://xbrl.org/2006/xbrldi" xmlns:xbrli="http://www.xbrl.org/2003/instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<xsl:output version="4.0" method="html" indent="no" encoding="UTF-8" use-character-maps="spaces" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" doctype-system="http://www.w3.org/TR/html4/loose.dtd"/>
<xsl:character-map name="spaces">
<xsl:output-character character=" " string=" "/>
</xsl:character-map>
<xsl:param name="SV_OutputFormat" select="'HTML'"/>
<xsl:param name="SV_BaseOutputFileName" as="xs:string?">
<xsl:sequence select="for $i in altovaext:get-base-output-uri(), $j in tokenize( $i, '[/\\]' )[last()] return replace( $j, '\.[^\.\s#%;]*$', '' )" use-when="function-available('altovaext:get-base-output-uri')"/>
</xsl:param>
.....
...