I am having a problem that some code that output fine with transformiix
but is not evaluatiing consistenly with sablotron.
Is this possibly because certain language features may not be
implemented?

I include the revelevant portions of code below. In short, I have
different types of xml INPUT tags such as:
<INPUT TYPE="text" NAME="pathname">
<INPUT TYPE="select" NAME="doc_type">
<INPUT TYPE="radio" NAME="versions" >
<INPUT TYPE="submit" NAME="submit">

I am trying to match while testing the TYPE attribute but have found
that these elements are sometimes being parsed fully or incompletely or
not at all. The wierd thing is that the syntax I'm using is exactly the
same for all cases.

Problems the code samples below:

<FORM STATE="0"> 
        Only displays the PROMPT element from INPUT TYPE="select" but not the
rest of that INPUT element and none of the other INPUT elements are
output at all.

<FORM STATE="1">
        Only displays INPUT TYPE="radio" (completely) but not any of the other
inputs except for the PROMPT
Thanks for any and all insights!

-----------------
XML snippet:

<FORM STATE="0">
                <METHOD>POST</METHOD>
                <NEXT_STATE>1</NEXT_STATE>
                <HEADING>Publish a new document:</HEADING>

                <DESCRIPTION>
                </DESCRIPTION>

                <INPUT TYPE="select" NAME="doc_type">           
                        <PROMPT>Select document TYPE</PROMPT>
                        <OPTION>
                                <TEXT>Press Release</TEXT>
                                <VALUE>value1</VALUE>
                        </OPTION>
                        <OPTION>
                                <TEXT>Product Description</TEXT>
                                <VALUE>value2</VALUE>
                        </OPTION>
                        <OPTION>
                                <TEXT>Item 3</TEXT>
                                <VALUE>value3</VALUE>
                        </OPTION>
                </INPUT>

                <INPUT TYPE="submit" NAME="submit">
                        <VALUE>Continue...</VALUE>
                </INPUT>

        </FORM>

        <FORM STATE="1">
                <METHOD>POST</METHOD>
                <NEXT_STATE>2</NEXT_STATE>
                <HEADING>Select documents to browse</HEADING>

                <INPUT TYPE="text" NAME="pathname">
                        <PROMPT>Path</PROMPT>
                        <VALUE></VALUE>
                </INPUT>

                <INPUT TYPE="text" NAME="language_tag">
                        <PROMPT>Language Tag</PROMPT>
                        <VALUE>en-US</VALUE>
                </INPUT>

                <INPUT TYPE="text" NAME="locale_tag" >
                        <PROMPT>Locale Tag</PROMPT>
                        <VALUE>en_US</VALUE>
                </INPUT>

                <INPUT TYPE="radio" NAME="versions" >
                        <PROMPT>Versions to display</PROMPT>
                        <BUTTON>
                                <TEXT>All</TEXT>
                                <VALUE>all</VALUE>                              
                        </BUTTON>
                        <BUTTON>
                                <TEXT>Only the latest</TEXT>
                                <VALUE>latest</VALUE>                           
                        </BUTTON>
                </INPUT>

                <INPUT TYPE="submit" NAME="submit">
                        <VALUE>Browse</VALUE>
                </INPUT>

        </FORM>
-----------------
XSL snippet:


<xsl:template match="FORM">
        <FORM method="{METHOD}"
action="{$PHP_SELF}?from_state={$from_state}&amp;goto_state={NEXT_STATE}&amp;cmd={$cmd}&amp;debug={$debug}">
                <H3>
                        <xsl:value-of select="HEADING" /> 
                </H3>

                <TABLE>
                                <xsl:apply-templates select="INPUT"/>
                </TABLE>
        </FORM>
</xsl:template>

<xsl:template match="INPUT[@TYPE='select']">
        <TR>
                <xsl:apply-templates select="PROMPT"/>
                <TD>
                        <SELECT name="{@NAME}">
                                <xsl:apply-templates select="OPTION"/>
                        </SELECT>
                </TD>
        </TR>
</xsl:template>


<xsl:template match="OPTION">
        <OPTION value="{VALUE}">
                <xsl:value-of select="TEXT"/>
        </OPTION>
</xsl:template>

<xsl:template match="INPUT[@TYPE='submit']">
        <TR>
                <xsl:apply-templates select="PROMPT"/>
                <TD>
                        <INPUT type="submit" name="{@NAME}" value="{VALUE}">
                        </INPUT>
                </TD>
        </TR>
</xsl:template>


<xsl:template match="INPUT[@TYPE='text']">
        <TR>
                <xsl:apply-templates select="PROMPT"/>
                <TD>
                        <INPUT type="text" name="{@NAME}" value="{VALUE}">
                        </INPUT>
                </TD>
        </TR>
</xsl:template>

<xsl:template match="INPUT/PROMPT">
                <TD><B>
                <xsl:value-of select="."/>:
                </B></TD>
</xsl:template>

<xsl:template match="INPUT[@TYPE='radio']">
        <TR>
                <xsl:apply-templates select="PROMPT"/>

                <xsl:for-each select="BUTTON">
                        <TR>
                        <TD>
                                <INPUT type="radio" name="{../@NAME}" 
value="{VALUE}"></INPUT>
                                &#xa0;&#xa0;<xsl:value-of select="TEXT"/>
                        </TD>
                        </TR>
                </xsl:for-each>

        </TR>
</xsl:template>

-- 
greg keraunen 
[EMAIL PROTECTED]
web software engineer

Reply via email to