Hi Santiago,

With Tom bridging Xalan and Cocoon, we have had a very productive
relationship in the past.
I hope we will continue the high productivity record.

Attached are the xml source and the corresponding Xalan and XSLTC ouputs
produced with Xalan 2.4.1.
As you will notice they are very different.
I also attach the two XSLT files which are applied sequentially.
wizard2html.xsl first and then xmlform2html.xsl.

Hopefully this is enough information to track down the bug causing different
outputs.


Regards,

Ivelin




----- Original Message -----
From: "Tom Amiro" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; "Santiago Pericas-Geertsen"
<[EMAIL PROTECTED]>
Sent: Wednesday, December 11, 2002 8:05 AM
Subject: Re: [PROBLEM]: XSLTC does not work


> Ivelin,
>
> I am not the best contact person anymore. Moved off onto other projects
:-(
> xalan-dev is the correct forum. Santiago Pericas-Geertsen
<[EMAIL PROTECTED]>
> is probably the best person to help you.
>
> I would have taken a quick look at it, but no one ever sent me a
> description of the differences between Xalan interpretive and
> XSLTC for given xml/xsl input.
>
> If you can isolate the problem to XSLT that would be great; otherwise,
> we'd need a lot more information on how to set up a test
> case with Cocoon and Tomcat to reproduce it.
>
> Tom
>
>
> Ivelin Ivanov wrote:
> >
> > Tom,
> >
> > There were a few more messages on the list regarding Xalan 2.4.1 and
XSLTC.
> > Do you have progress on the reported problems?
> >
> > Ivelin
> >
> > ----- Original Message -----
> > From: "Tom Amiro" <[EMAIL PROTECTED]>
> > To: "Ivelin Ivanov" <[EMAIL PROTECTED]>
> > Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
> > <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
> > Sent: Monday, July 08, 2002 9:03 AM
> > Subject: Re: [PROBLEM]: XSLTC does not work
> >
> > > Hi,
> > >
> > > We'll do some testing with 1.4.1_01 to see if the problem
> > > is with the JVM or with XSLTC.
> > >
> > > Carsten, or anyone else, can you give us more information
> > > on the differences in output generated by Xalan versus
> > > XSLTC when you are not running on 1.4.1_01?
> > >
> > > Tom
> > >
> > > Ivelin Ivanov wrote:
> > > >
> > > > Sorry for the delayed response, my PC power supply burnt.
> > > >
> > > > Would it be too painful to do what Jeremy is when XSLTC is broken?
> > > > I though we all felt that long term we want XSLTC as the main Cocoon
> > > > processor.
> > > > Making XSLTC  default now in 2.1-dev is the only reasonably fast way
to
> > have
> > > > it working for the next major release.
> > > > Otherwise it's just taking way too long for individuals to test it
while
> > the
> > > > XSLTC team is pretty fast at resolving issues.
> > > > I think we should take advantage of their current availability.
> > > > Having a 5x faster processor is just too tempting to miss.
> > > >
> > > > If you think I'm wrong, vote against, otherwise vote for keeping
XSLTC
> > as
> > > > default for now.
> > > >
> > > > +1
> > > >
> > > > Gianugo, Tom, can you please communicate the problems to the XSLTC
team?
> > > >
> > > > Also, for those who encounter new bugs, in order to reduce turn
around
> > time,
> > > > please send bugs with sypmtoms directly to Tom and the xsltc-team
list
> > in
> > > > addition to cocoo-dev.
> > > >
> > > > Thanks.
> > > >
> > > > Ivelin
> > > >
> > > > On Monday, July 1, 2002, at 01:08 PM, Carsten Ziegeler wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > with the latest switch to XSLTC, Cocoon isn't working anymore for
> > > > > me. My system is JDK 1.4.0.01, W2K, Tomcat 3.3a.
> > > >
> > > > JDK 1.3.1, MacOSX 10.1.5, TomCat 4.0.4-b3
> > > >
> > > > I don't get exceptions, but I get some expressions not returning
> > > > results with xsltc where they do with xalan. (I'll do a proper
> > > > examination of what's going wrong later).
> > > >
> > > > Switching my sitemap's default transformer to 'xalan' solves all
> > > > the problems.
> > > >
> > > > regards Jeremy
> > >
> > > --
> > >  Tom Amiro -- SQA Engineer
> > >  Sun XML Technology Development
> > >  voice: 781-442-0589 Fax: 781-442-1437
> > >  eMail: tom.amiro@.sun.com
>
> --
>  Tom Amiro -- SQE Engineer
>  WTS - Interoperability and Quality
>  voice: 781-442-0589 Fax: 781-442-1437
>  eMail: tom.amiro@.sun.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
Title: XMLForm - Cocoon Feedback Wizard




Confirm Input

First Name

[Donald]

Last Name

[Duck]

Email

[[EMAIL PROTECTED]]

Age

[5]
Professional roles
Personal hobbies

[gym]

[swim]

[soccer]

[ski]

Hidden attribute

[true]

Number of installations

[1]

Live URL

[http://]

Publish URL

[false]

OS

[]

Processor

[p4]

RAM

[512]

Servlet Engine

[Tomcat]

Java Version

[1.3]
Favorite web sites

URL:

[http://xml.apache.org/cocoon]

URL:

[http://jakarta.apache.org]

URL:

[http://www.google.com]


Visits Count : [4]
<?xml version="1.0" encoding="UTF-8"?>

<document xmlns:xf="http://xml.apache.org/cocoon/xmlform/2002";>
  <xf:form id="form-feedback" view="confirm" action="wizard">
    <xf:caption>Confirm Input</xf:caption>
    <!-- from page1 -->
    <xf:output ref="firstName"><xf:value>Donald</xf:value>
      <xf:caption>First Name</xf:caption>
    </xf:output>
    <xf:output ref="lastName"><xf:value>Duck</xf:value>
      <xf:caption>Last Name</xf:caption>
    </xf:output>
    <xf:output ref="email"><xf:value>[EMAIL PROTECTED]</xf:value>
      <xf:caption>Email</xf:caption>
    </xf:output>
    <xf:output ref="age"><xf:value>5</xf:value>
      <xf:caption>Age</xf:caption>
      
    </xf:output>
    <xf:group ref="/">
      <xf:caption>Professional roles</xf:caption>
      <xf:repeat nodeset="role"/>
    </xf:group>
    <xf:group ref="/">
      <xf:caption>Personal hobbies</xf:caption>
      <xf:repeat nodeset="hobby"><xf:group ref="/hobby[1]"><xf:output ref="/hobby[1]/."><xf:value>gym</xf:value></xf:output>
      </xf:group><xf:group ref="/hobby[2]"><xf:output ref="/hobby[2]/."><xf:value>swim</xf:value></xf:output>
      </xf:group><xf:group ref="/hobby[3]"><xf:output ref="/hobby[3]/."><xf:value>soccer</xf:value></xf:output>
      </xf:group><xf:group ref="/hobby[4]"><xf:output ref="/hobby[4]/."><xf:value>ski</xf:value></xf:output>
      </xf:group></xf:repeat>
    </xf:group>
    <xf:output ref="hidden"><xf:value>true</xf:value>
      <xf:caption>Hidden attribute</xf:caption>
    </xf:output>
    <!-- from page2 -->
    <xf:output ref="number"><xf:value>1</xf:value>
      <xf:caption>Number of installations</xf:caption>
    </xf:output>
    <xf:output ref="liveUrl"><xf:value>http://</xf:value>
      <xf:caption>Live URL</xf:caption>
    </xf:output>
    <xf:output ref="publish"><xf:value>false</xf:value>
      <xf:caption>Publish URL</xf:caption>
    </xf:output>
    <!-- from page3 -->
    <xf:output ref="system/os"><xf:value/>
      <xf:caption>OS</xf:caption>
    </xf:output>
    <xf:output ref="system/processor"><xf:value>p4</xf:value>
      <xf:caption>Processor</xf:caption>
    </xf:output>
    <xf:output ref="system/@ram"><xf:value>512</xf:value>
      <xf:caption>RAM</xf:caption>
    </xf:output>
    <xf:output ref="system/servletEngine"><xf:value>Tomcat</xf:value>
      <xf:caption>Servlet Engine</xf:caption>
    </xf:output>
    <xf:output ref="system/javaVersion"><xf:value>1.3</xf:value>
      <xf:caption>Java Version</xf:caption>
    </xf:output>
    <xf:group ref="/" id="favorites_group">
      <xf:caption>Favorite web sites</xf:caption>
      <xf:repeat nodeset="favorite[position() &lt;= 3]" id="favorites"><xf:group ref="/favorite[1]"><xf:output class="info" ref="/favorite[1]/."><xf:value>http://xml.apache.org/cocoon</xf:value>
          <xf:caption>URL: </xf:caption>
        </xf:output>
      </xf:group><xf:group ref="/favorite[2]"><xf:output class="info" ref="/favorite[2]/."><xf:value>http://jakarta.apache.org</xf:value>
          <xf:caption>URL: </xf:caption>
        </xf:output>
      </xf:group><xf:group ref="/favorite[3]"><xf:output class="info" ref="/favorite[3]/."><xf:value>http://www.google.com</xf:value>
          <xf:caption>URL: </xf:caption>
        </xf:output>
      </xf:group></xf:repeat>
    </xf:group>
    <!-- submit -->
    <xf:submit id="prev" class="button">
      <xf:caption>Prev</xf:caption>
      <xf:hint>Go to previous page</xf:hint>
    </xf:submit>
    <xf:submit id="next" class="button">
      <xf:caption>Finish</xf:caption>
      <xf:hint>Finish the wizard</xf:hint>
    </xf:submit>
  </xf:form>
  <xf:output ref="count" id="show_count" form="form-feedback" class="info"><xf:value>6</xf:value>
    <xf:caption>Visits Count</xf:caption>
  </xf:output>
</document>
Title: XMLForm - Cocoon Feedback Wizard




[Donald] [Duck] [[EMAIL PROTECTED]] [5] [true] [1] [http://] [false] [] [p4] [512] [Tomcat] [1.3]

Confirm Input

Professional roles
Personal hobbies
[gym]
[swim]
[soccer]
[ski]
Favorite web sites
[http://xml.apache.org/cocoon]
[http://jakarta.apache.org]
[http://www.google.com]


Visits Count : [14]
<?xml version="1.0" encoding="UTF-8"?>
<!--
	Cocoon Feedback Wizard XMLForm processing and displaying stylesheet.	
  
  This stylesheet merges an XMLForm document into 
  a final document. It includes other presentational
  parts of a page orthogonal to the xmlform.

  author: Ivelin Ivanov, [EMAIL PROTECTED], May 2002
  author: Konstantin Piroumian <[EMAIL PROTECTED]>, September 2002
  author: Simon Price <[EMAIL PROTECTED]>, September 2002

-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
	xmlns:xf="http://xml.apache.org/cocoon/xmlform/2002";
	exclude-result-prefixes="xalan" >
	<xsl:template match="document">
		<html>
			<head>
				<title>XMLForm - Cocoon Feedback Wizard</title>
				<style type="text/css"> <![CDATA[
              H1{font-family : sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;} 
              BODY{font-family : sans-serif,Arial,Tahoma;color : black;background-color : white;} 
              B{color : white;background-color : blue;} 
              HR{color : #0086b2;}
              input { background-color: #FFFFFF; color: #000099; border: 1px solid #0000FF; }		
              table { background-color: #EEEEEE; color: #000099; font-size: x-small; border: 2px solid brown;}
              select { background-color: #FFFFFF; color: #000099 }
             .caption { line-height: 195% }
             .error { color: #FF0000; }	      
             .help { color: #0000FF; font-style: italic; }
             .invalid { color: #FF0000; border: 2px solid #FF0000; }
             .info { color: #0000FF; border: 1px solid #0000FF; }
             .repeat { border: 0px inset #999999;border: 1px inset #999999; width: 100%; }
             .group { border: 0px inset #999999;border: 0px inset #999999;  width: 100%; }
             .sub-table { border: none; }
             .button { background-color: #FFFFFF; color: #000099; border: 1px solid #666666; width: 70px; }
             .plaintable { border: 0px inset black;border: 0px inset black; width: 100%; }
              ]]> </style>
			</head>
			<body>
				<xsl:apply-templates />
			</body>
		</html>
	</xsl:template>
	<xsl:template match="xf:form">
		<xf:form method="post">
			<xsl:copy-of select="@*" />
			<br/>
			<br/>
			<br/>
			<br/>
			<table align="center" border="0">
				<tr>
					<td align="center" colspan="3">
						<h1>
							<xsl:value-of select="xf:caption"/>
							<hr/>
						</h1>
					</td>
				</tr>
				<xsl:if test="count(error/xf:violation) > 0">
					<tr>
						<td align="left" colspan="3"
							class="{error/xf:violation[1]/@class}">
							<p>* There are [<b><xsl:value-of
								select="count(error/xf:violation)"/></b>] 
								errors. Please fix these errors and submit the
								form again.</p>
							<p>
								<xsl:variable name="localViolations"
									select=".//xf:*[ child::xf:violation ]"/>
								<xsl:for-each select="error/xf:violation">
									<xsl:variable name="eref" select="./@ref"/>
									<xsl:if
										test="count ($localViolations[ @ref=$eref ]) = 0"
										>* <xsl:value-of select="." /> <br/> </xsl:if>
								</xsl:for-each>
							</p>
							<p/>
						</td>
					</tr>
				</xsl:if>
				<xsl:for-each select="*[name() != 'xf:submit']">
					<xsl:choose>
						<xsl:when test="name() = 'error'"/>
						<xsl:when test="name() = 'xf:caption'"/>
						<xsl:when test="xf:*">
							<xsl:apply-templates select="."/>
						</xsl:when>
						<xsl:otherwise>
							<xsl:copy-of select="."/>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:for-each>
				<tr>
					<td align="center" colspan="3">
						<xsl:for-each select="*[name() = 'xf:submit']">
							<xsl:copy-of select="." />
							<xsl:text>
							</xsl:text>
						</xsl:for-each>
					</td>
				</tr>
			</table>
		</xf:form>
	</xsl:template>
	<xsl:template match="xf:repeat">
		<tr width="100%">
			<td colspan="3" width="100%">
				<table class="repeat">
					<xsl:apply-templates select="*"/>
				</table>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="xf:group">
		<tr width="100%">
			<td width="100%" colspan="2">
				<table class="group" border="0">
					<tr>
						<td align="left">
							<xsl:value-of select="xf:caption" />
						</td>
					</tr>
					<xsl:apply-templates select="*"/>
				</table>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="xf:output[@form]">
		<div align="center">
			<hr width="30%"/>
			<br/>
			<font size="-1">
				<code> <xsl:value-of select="xf:caption" /> : <xsl:copy-of
					select="." /> </code>
			</font>
			<br/>
		</div>
	</xsl:template>
	<xsl:template match="xf:caption"/>
	<xsl:template match="xf:*">
		<tr>
			<td align="left" valign="top">
				<p class="caption">
					<xsl:value-of select="xf:caption" />
				</p>
			</td>
			<td align="left">
				<table class="plaintable">
					<tr>
						<td align="left">
							<xsl:copy-of select="." />
						</td>
						<xsl:if test="xf:violation">
							<td align="left" class="{xf:violation[1]/@class}"
								width="100%">
								<xsl:for-each select="xf:violation">* 
									<xsl:value-of select="." /> <br/> </xsl:for-each>
							</td>
						</xsl:if>
					</tr>
				</table>
				<xsl:if test="xf:help">
					<div class="help">
						<xsl:value-of select="xf:help" />
					</div>
					<br />
				</xsl:if>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="*">
		<xsl:copy-of select="." />
	</xsl:template>
</xsl:stylesheet>
<?xml version="1.0" encoding="iso-8859-1" ?>


<!-- 

  Basic XMLForm processing stylesheet.  
  Converts XMLForm tags to HTML tags.
  
  Syntax is borrowed from the XForms standard.
  http://www.w3.org/TR/2002/WD-xforms-20020118/
  
  This stylesheet is usually applied at the end of a 
  transformation process after laying out the xmlform
  tags on the page is complete. At this stage xmlform tags 
  are rendered in device specific format.
  
  Different widgets are broken into templates 
  to allow customization in importing stylesheets

  author: Ivelin Ivanov, [EMAIL PROTECTED], June 2002
  author: Andrew Timberlake <[EMAIL PROTECTED]>, June 2002
  author: Michael Ratliff, [EMAIL PROTECTED] <[EMAIL PROTECTED]>, May 2002
  author: Torsten Curdt, [EMAIL PROTECTED], March 2002
  author: Simon Price <[EMAIL PROTECTED]>, September 2002
  author: Konstantin Piroumian <[EMAIL PROTECTED]>, September 2002
  author: Robert Ellis Parrott <[EMAIL PROTECTED]>, October 2002
-->

<xsl:stylesheet version="1.0" 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
    xmlns:xf="http://xml.apache.org/cocoon/xmlform/2002";>

   <xsl:output method = "xml" omit-xml-declaration = "no"  /> 
  

   <xsl:template match="/">
     <xsl:apply-templates />
   </xsl:template>


   <xsl:template match="xf:form">
      <form>
         <xsl:copy-of select="@*"/>

         <!-- the xf:form/@view attributed is sent back to the server as a hidden field -->
         <input type="hidden" name="cocoon-xmlform-view" value="{@view}"/>
         
         <!-- render the child form controls -->
         <xsl:apply-templates />
         
      </form>
   </xsl:template>


   <xsl:template match="xf:output">
      [<xsl:value-of select="xf:value/text()"/>]
   </xsl:template>


   <xsl:template match="xf:textbox">
      <!-- the ref attribute is assigned to html:name, which is how it is linked to the model -->
      <input name="{@ref}" type="textbox" value="{xf:value/text()}">
        <!-- copy all attributes from the original markup, except for "ref" -->
        <xsl:copy-of select="@*[not(name()='ref')]"/>
        <xsl:apply-templates select="xf:hint"/>
      </input>
   </xsl:template>


   <xsl:template match="xf:textarea">
      <textarea name="{@ref}" >
        <xsl:copy-of select="@*[not(name()='ref')]"/>
        <xsl:value-of select="xf:value/text()"/>
        <xsl:apply-templates select="xf:hint"/>
      </textarea>
   </xsl:template>


   <xsl:template match="xf:password">
      <input name="{@ref}" type="password" value="{xf:value/text()}">
        <xsl:copy-of select="@*[not(name()='ref')]"/>
        <xsl:apply-templates select="xf:hint"/>
      </input>
   </xsl:template>


   <xsl:template match="xf:hidden">
      <input name="{@ref}" type="hidden" value="{xf:value/text()}">
        <xsl:copy-of select="@*[not(name()='ref')]"/>
      </input>
   </xsl:template>


   <xsl:template match="xf:selectBoolean">
      <input name="{@ref}" type="checkbox" value="true">
        <xsl:copy-of select="@*[not(name()='ref')]"/>
          <xsl:if test="xf:value/text() = 'true'">
          <xsl:attribute name="checked"/>
        </xsl:if>
        <xsl:apply-templates select="xf:hint"/>
      </input>
   </xsl:template>


   <xsl:template match="xf:selectOne | xf:selectOne[@selectUIType='listbox']">
     <select name="{@ref}">
     <xsl:copy-of select="@*[not(name()='ref')]"/>
     <!-- all currently selected nodes are listed as value elements -->
       <xsl:variable name="selected" select="xf:value"/>
       <xsl:for-each select="xf:item">
         <option value="{xf:value}">
           <!-- If the current item value matches one of the selected values -->
           <!-- mark it as selected in the listbox -->
           <xsl:if test="$selected = xf:value">
             <xsl:attribute name="selected"/>
           </xsl:if>
           <xsl:value-of select="xf:caption"/>
         </option>
       </xsl:for-each>
     </select>
   </xsl:template>

   
   <xsl:template match="xf:selectOne[@selectUIType='radio']">
        <xsl:variable name="selected" select="xf:value"/>
        <xsl:variable name="ref" select="@ref"/>
        <xsl:for-each select="xf:item">
            <input name="{$ref}" type="radio" value="{xf:value}">
                <xsl:copy-of select="@*[not(name()='ref')]"/>
                <xsl:if test="xf:value = $selected">
                    <xsl:attribute name="checked"/>
                </xsl:if>
            </input>
            <xsl:value-of select="xf:caption"/>
            <br/>
        </xsl:for-each>
   </xsl:template>

   
   <xsl:template match="xf:selectMany | xf:selectMany[@selectUIType='listbox']">
     <xsl:variable name="selected" select="xf:value"/>
     <select name="{@ref}">
       <xsl:copy-of select="@*[not(name()='ref')]"/>
       <xsl:attribute name="multiple"/>
       <xsl:for-each select="xf:item">
         <option value="{xf:value}">
           <xsl:if test="xf:value = $selected">
             <xsl:attribute name="selected"/>
           </xsl:if>
           <xsl:value-of select="xf:caption"/>
         </option>
       </xsl:for-each>
     </select>  
   </xsl:template>

   
   <xsl:template match="xf:selectMany[@selectUIType='checkbox']">
        <xsl:variable name="selected" select="xf:value"/>
        <xsl:variable name="ref" select="@ref"/>
        <xsl:for-each select="xf:item">
            <input name="{$ref}" type="checkbox" value="{xf:value}">
                <xsl:copy-of select="@*[not(name()='ref')]"/>
                <xsl:if test="xf:value = $selected">
                  <xsl:attribute name="checked"/>
                </xsl:if>
            </input>
            <xsl:value-of select="xf:caption"/>
            <br/>
        </xsl:for-each>
   </xsl:template>

   
   
   <xsl:template match="xf:submit">
       <!-- the id attribute of the submit control is sent to the server -->
       <!-- as a conventional Cocoon Action parameter of the form cocoon-action-* -->
      <input name="cocoon-action-{@id}" type="submit" value="{xf:caption/text()}">
        <xsl:copy-of select="@*[not(name()='id')]"/>
        <xsl:apply-templates select="xf:hint"/>
      </input>
   </xsl:template>
   
   <xsl:template match="xf:hint">
          <xsl:attribute name="title"><xsl:value-of select="."/></xsl:attribute>
   </xsl:template>


   <!-- copy all the rest of the markup which is not recognized above -->
   <xsl:template match="*">
      <xsl:copy><xsl:copy-of select="@*" /><xsl:apply-templates /></xsl:copy>
   </xsl:template>

   <xsl:template match="text()">
      <xsl:value-of select="." />
   </xsl:template>

</xsl:stylesheet>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to