[oXygen-user] Failure to identify missing xsl:choose element

McGibbney, Lewis John Lewis.McGibbney at gcu.ac.uk
Wed Apr 18 04:33:49 CDT 2012


Hi George,

The behaviour you explain makes sense.
I was using Xalan with xsl v.2.0 so this explains it.

Thanks for taking the time to have a look.

Best

Lewis
________________________________________
From: George Cristian Bina [george at oxygenxml.com]
Sent: 17 April 2012 20:58
To: McGibbney, Lewis John
Cc: oxygen-user at oxygenxml.com
Subject: Re: [oXygen-user] Failure to identify missing xsl:choose element

Dear Lewis,

It depends on what the XSLT processor says... but there should not be a
difference between the debugger and a normal transformation if you use
the same XSLT engine.

I was able to run a transformation containing this situation only with
Xalan and also when the version attribute is set to 2.0, which Xalan
does not support - and that is why probably its behavior is not the
expected one, that is to report an error. With Saxon (any version) I
obtain the expected error no matter what version I set on the XSLT
stylesheet.

If you see a different behavior please provide a simple XSLT stylesheet
and a description to allow us to reproduce that.

Best Regards,
George
--
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

On 4/17/12 8:23 PM, McGibbney, Lewis John wrote:
> Hi,
>
> I have the following xslt
>
>          <Secondary>
>              <Body DocumentURI="" IdURI="" NumberOfProvisions="" RestrictStartDate="">
>                  <xsl:for-each select="html:html/html:body/html:div/html:div[@class='page css-gen1']">
>                  <SectionPage>
>                      <xsl:value-of select="@id"/>
>                  </SectionPage>
>                  <Sectionheader>
>                      <xsl:value-of select="html:div[1]/html:div/html:span/html:span"/>
>                  </Sectionheader>
>                  <xsl:when test="html:div[2]/html:div/html:span[@class='css-gen3'] and
>                     html:div[2]/html:div[2]/html:span[@class='css-gen5']">
>                       <xsl:call-template name="createStandardHead"/>
>                  </xsl:when>
>                  </xsl:for-each>
>
> Which seems to be fine when running it through the debugger, however when I attempt to run a transformation scenario with the xslt I get the following error:
>
> System ID: /media/PENDRIVE/xmlcalabash/xslt/transform_sections.xsl
> Scenario: STS_Transform
> XML file: /media/PENDRIVE/xmlcalabash/input/0.1.xhtml
> XSL file: /media/PENDRIVE/xmlcalabash/xslt/transform_sections.xsl
> Engine name: Saxon6.5.5
> Severity: error
> Description: xsl:when must be immediately within xsl:choose
> Start location: 129:0
>
> Is it known that the debugger fails to pick this up?
>
> Thanks
>
> Lewis
>
> lewis.mcgibbney at gcu.ac.uk
>
> Glasgow Caledonian University is a registered Scottish charity, number SC021474
>
> Winner: Times Higher Education’s Widening Participation Initiative of the Year 2009 and Herald Society’s Education Initiative of the Year 2009.
> http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en.html
>
> Winner: Times Higher Education’s Outstanding Support for Early Career Researchers of the Year 2010, GCU as a lead with Universities Scotland partners.
> http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,15691,en.html
> _______________________________________________
> oXygen-user mailing list
> oXygen-user at oxygenxml.com
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user

Glasgow Caledonian University is a registered Scottish charity, number SC021474

Winner: Times Higher Education’s Widening Participation Initiative of the Year 2009 and Herald Society’s Education Initiative of the Year 2009.
http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en.html

Winner: Times Higher Education’s Outstanding Support for Early Career Researchers of the Year 2010, GCU as a lead with Universities Scotland partners.
http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,15691,en.html


More information about the oXygen-user mailing list