Jump to content

agumiya

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by agumiya

  1.  

    When compiling your stylesheet, your XSLT processor should tell you that the `xsl:with-param` is not allowed where you put it. For instance with

    <xsl:stylesheet    version="1.0"    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">    <xsl:template match="root">  <xsl:apply-templates select="foo"/>  <xsl:with-param name="p" select="1"/></xsl:template></xsl:stylesheet>

    Saxon 6.5.5 tells me

    Error at xsl:with-param on line 7 of file:/C:/Users/Foo/Bar/sheet.xsl  xsl:with-param cannot appear as a child of xsl:template

     

    Thank you Martin !

     

    I`ll check into it.

  2. Hello !

     

    Hope someone could help me with this one.

     

    I accidently wrote this code:

     

    <select name="TYPE" id="TYPE" > <xsl:apply-templates select="TYPE-OPTION" /> <!-- The '/' closed the tag too early --> <xsl:with-param name="Slctd" select="normalize-space(TYPE-SELECTED)" /> <!--The with-param became worthless--></select>

     

    It was suppose to be like this :

    <select name="TYPE" id="TYPE" > <xsl:apply-templates select="TYPE-OPTION"> <xsl:with-param name="Slctd" select="normalize-space(TYPE-SELECTED)" />

    </xsl:apply-templates> <!-- now the with-param is doing something --></select>

     

    As you can see in the first part, I accidently closed the xsl:apply-templates tag too early with / , making the with-param completely useless.

    This caused a bug.

     

    Is this code legal ?

    Is there a way or a product which could warn me about this kind of mistakes ?

     

    TNX

    Agumiya

×
×
  • Create New...