|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Trying to simply reformat but my stylesheet will not
I cannot restructure my working inline expression into the structured expressions that i want.
The original was working.
The task is: If there is any child element named "Service", output a <Total_Rollable_Charge> element, that adds up the amounts of the charges.
It was working this way:
<if test="Service">
<Total_Rollable_Charge Amount="{sum(Service//Charge[not(Trans_Class='I')]/Charge_Amount/Amount)}" Flag="HasSvc" />
</if> <!-- end if-service -->
The next similar task is so much more complex, so I want to factor this out into <xsl:element>
and <xsl:attribute> tags, and then use that as a model for the tougher one. This one is simple right?
<if test="Service">
<element name="Total_Rollable_Charge">
<attribute name="Amount">
<value-of select="{sum( Service//Charge[not(Trans_Class="I")]/Charge_Amount/Amount )}" />
</attribute>
<attribute name="Flag" >
<value-of select="HasSvc" />
</attribute>
</element>
</if>
but no!
ERROR: 'file:my.xsl:
line 427: Error parsing XPath expression '{sum( Service//Charge[not(Trans_Class="I")]/Charge_Amount/Amount )}'.'
FATAL ERROR: 'Could not compile stylesheet'
javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(Unknown Source)
at Middleware.Executor.main(Executor.java:278)
Where have I erred?
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








