cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: Error problem with Xalan?
Date Fri, 27 Apr 2001 16:32:20 GMT
Scott_Boag@lotus.com wrote:
> 
> It looks like a bizarre Xalan namespace bug.  Can you let me know the
> version of Xalan you are using?

It's not.  It really was illegal XSLT.

Here is the difference:

<xsl:apply-templates select="xform:item" mode="menu">
  <select name="{@ref}" alt="{xform:hint}"> <!-- ** BAD XSLT ** -->
    <xsl:with-param name="value"><xsl:value-of select="exfm:value"/></xsl:with-param>
  </select>
</xsl:apply-templates>

And the corrected XSLT:

<select name="{@ref}" alt="{xform:hint}"> <!-- ** GOOD XSLT -->
  <xsl:apply-templates select="xform:item" mode="menu">
    <xsl:with-param name="value"><xsl:value-of select="exfm:value"/></xsl:with-param>
  </xsl:apply-templates>
</select>

Notice how moving the <select> outside the <xsl:apply-templates>
makes all the difference?  It's times like this I feel stupid :-).

> 
> -scott
> 
> 
>                     Berin
>                     Loritsch             To:     "cocoon-dev@xml.apache.org" <cocoon-dev@xml.apache.org>
>                     <bloritsch@ap        cc:     (bcc: Scott Boag/CAM/Lotus)
>                     ache.org>            Subject:     Error problem with Xalan?
> 
>                     04/27/2001
>                     11:51 AM
>                     Please
>                     respond to
>                     cocoon-dev
> 
> 
> 
> I have a stylesheet where I am changing XForm-like markup
> to HTML markup.  The problem comes when I try to create an
> HTML Select tag.  TraxTransformer (and Xalan) are returning
> this exception:
> 
> ERROR   19930   [cocoon  ] (Thread-11): Error in TraxTransformer:
> file:/C:/tomcat/webapps/ROOT/ad-approval/stylesheets/xform2xhtml.xsl; Line
> 69; Column 45;
> ; SystemID:
> file:/C:/tomcat/webapps/ROOT/ad-approval/stylesheets/xform2xhtml.xsl;
> Line#: 69; Column#: 45
> 
> javax.xml.transform.TransformerException: select is not allowed in this
> position in the stylesheet!
> 
> The offending line is included here:
> 
>       <xsl:when test="$type='menu'">
>         <xsl:apply-templates select="xform:item" mode="menu">
>              <select name="{@ref}" alt="{xform:hint}"> <!-- ***** OFFENDING
> LINE ***** -->
>                <xsl:with-param name="value"><xsl:value-of select
> ="exfm:value"/></xsl:with-param>
>              </select>
>            </xsl:apply-templates>
>       </xsl:when>
> 
> Why is Xalan treating <select> and <xsl:select> the same?  this should not
> be.
> Is this a Cocoon environment error, or a Xalan namespace bug?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message