cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cross...@apache.org
Subject svn commit: r1413946 - in /cocoon/branches/BRANCH_2_1_X/src/blocks/naming/samples: forms/person-model.xml xslt/forms.xsl
Date Tue, 27 Nov 2012 00:01:16 GMT
Author: crossley
Date: Tue Nov 27 00:01:15 2012
New Revision: 1413946

URL: http://svn.apache.org/viewvc?rev=1413946&view=rev
Log:
Fix mess with dos line endings and set svn eol-style property.

Modified:
    cocoon/branches/BRANCH_2_1_X/src/blocks/naming/samples/forms/person-model.xml   (contents,
props changed)
    cocoon/branches/BRANCH_2_1_X/src/blocks/naming/samples/xslt/forms.xsl   (contents, props
changed)

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/naming/samples/forms/person-model.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/naming/samples/forms/person-model.xml?rev=1413946&r1=1413945&r2=1413946&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/naming/samples/forms/person-model.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/naming/samples/forms/person-model.xml Tue Nov
27 00:01:15 2012
@@ -1 +1,153 @@
-<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<fd:form xmlns:fd="http://apache.org/cocoon/forms/1.0#definition" xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
	<fd:widgets>

    <fd:messages id="messages">
      <fd:label><i18n:text i18n:catalogue="local">message.label</i18n:text></fd:label>
    </fd:messages>

		<fd:field id="firstname" required="true">
			<fd:label><i18n:text i18n:catalogue="local">field.firstname</i18n:text>:
</fd:label>
			<fd:hint><i18n:text i18n:catalogue="local">firstname.hint</i18n:text></fd:hint>
			<fd:help><i18n:text i18n:catalogue="local">firstname.help</i18n:text></fd:help>
			<fd:datatype base="string">
				<fd:validation>
					<fd:length min="2" max="50"/>
				</fd:validation>
			</fd:datatype>
		</fd:field>

		<fd:field id="lastname" required="true">
			<fd:label><i18n:text i18n:catalogue="local">field.lastname</i18n:text>:
</fd:label>
			<fd:hint><i18n:text i18n:catalogue="local">lastname.hint</i18n:text></fd:hint>
			<fd:help><i18n:text i18n:catalogue="local">lastname.help</i18n:text></fd:help>
			<fd:datatype base="string">
				<fd:validation>
					<fd:length min="2" max="50"/>
				</fd:validation>
			</fd:datatype>
		</fd:field>

		<fd:field id="email" required="true">
			<fd:label><i18n:text i18n:catalogue="local">field.email</i18n:text>:
</fd:label>
			<fd:hint><i18n:text i18n:catalogue="local">email.hint</i18n:text></fd:hint>
			<fd:help><i18n:text i18n:catalogue="local">email.help</i18n:text></fd:help>
			<fd:datatype base="string">
				<fd:validation>
					<fd:email/>
				</fd:validation>
			</fd:datatype>
		</fd:field>

		<fd:field id="deptName" required="true">
			<fd:label><i18n:text i18n:catalogue="local">field.deptName</i18n:text>:
</fd:label>
			<fd:hint><i18n:text i18n:catalogue="local">deptName.hint</i18n:text></fd:hint>
			<fd:help><i18n:text i18n:catalogue="local">deptName.help</i18n:text></fd:help>
			<fd:datatype base="string">
				<fd:validation>
					<fd:length min="2" max="50"/>
				</fd:validation>
			</fd:datatype>
		</fd:field>
		
		<fd:field id="address1" required="true">
			<fd:label><i18n:text i18n:catalogue="local">field.address1</i18n:text>:
</fd:label>
			<fd:hint><i18n:text i18n:catalogue="local">address1.hint</i18n:text></fd:hint>
			<fd:help><i18n:text i18n:catalogue="local">address1.help</i18n:text></fd:help>
			<fd:datatype base="string"/>
			<fd:validation>
				<fd:length min="2" max="50"/>
			</fd:validation>
		</fd:field>
		
		<fd:field id="address2" required="true">
			<fd:label><i18n:text i18n:catalogue="local">field.address2</i18n:text>:
</fd:label>
			<fd:hint><i18n:text i18n:catalogue="local">address2.hint</i18n:text></fd:hint>
			<fd:help><i18n:text i18n:catalogue="local">address2.help</i18n:text></fd:help>
			<fd:datatype base="string"/>
			<fd:validation>
				<fd:length min="2" max="50"/>
			</fd:validation>
		</fd:field>
		
		<fd:field id="address3" required="true">
			<fd:label><i18n:text i18n:catalogue="local">field.address3</i18n:text>:
</fd:label>
			<fd:hint><i18n:text i18n:catalogue="local">address3.hint</i18n:text></fd:hint>
			<fd:help><i18n:text i18n:catalogue="local">address3.help</i18n:text></fd:help>
			<fd:datatype base="string"/>
			<fd:validation>
				<fd:length min="2" max="50"/>
			</fd:validation>
		</fd:field>
		
		<fd:field id="postcode" required="true">
			<fd:label><i18n:text i18n:catalogue="local">field.postcode</i18n:text>:
</fd:label>
			<fd:hint><i18n:text i18n:catalogue="local">postcode.hint</i18n:text></fd:hint>
			<fd:help><i18n:text i18n:catalogue="local">postcode.help</i18n:text></fd:help>
			<fd:datatype base="string"/>
			<fd:validation>
				<fd:length min="2" max="50"/>
			</fd:validation>
		</fd:field>
		
		<fd:field id="ophone" required="true">
			<fd:label><i18n:text i18n:catalogue="local">field.ophone</i18n:text>:
</fd:label>
			<fd:hint><i18n:text i18n:catalogue="local">ophone.hint</i18n:text></fd:hint>
			<fd:help><i18n:text i18n:catalogue="local">ophone.help</i18n:text></fd:help>
			<fd:datatype base="string"/>
			<fd:validation>
				<fd:length min="2" max="50"/>
			</fd:validation>
		</fd:field>
		
		<fd:field id="fphone" required="false">
			<fd:label><i18n:text i18n:catalogue="local">field.fphone</i18n:text>:
</fd:label>
			<fd:hint><i18n:text i18n:catalogue="local">fphone.hint</i18n:text></fd:hint>
			<fd:help><i18n:text i18n:catalogue="local">fphone.help</i18n:text></fd:help>
			<fd:datatype base="string"/>
			<fd:validation>
				<fd:length min="2" max="50"/>
			</fd:validation>
		</fd:field>
		
		<fd:field id="mphone" required="false">
			<fd:label><i18n:text i18n:catalogue="local">field.mphone</i18n:text>:
</fd:label>
			<fd:hint><i18n:text i18n:catalogue="local">mphone.hint</i18n:text></fd:hint>
			<fd:help><i18n:text i18n:catalogue="local">mphone.help</i18n:text></fd:help>
			<fd:datatype base="string"/>
			<fd:validation>
				<fd:length min="2" max="50"/>
			</fd:validation>
		</fd:field>
		
		<fd:field id="hphone" required="false">
			<fd:label><i18n:text i18n:catalogue="local">field.hphone</i18n:text>:
</fd:label>
			<fd:hint><i18n:text i18n:catalogue="local">hphone.hint</i18n:text></fd:hint>
			<fd:help><i18n:text i18n:catalogue="local">hphone.help</i18n:text></fd:help>
			<fd:datatype base="string"/>
			<fd:validation>
				<fd:length min="2" max="50"/>
			</fd:validation>
		</fd:field>
		
		<fd:field id="pager" required="false">
			<fd:label><i18n:text i18n:catalogue="local">field.pager</i18n:text>:
</fd:label>
			<fd:hint><i18n:text i18n:catalogue="local">pager.hint</i18n:text></fd:hint>
			<fd:help><i18n:text i18n:catalogue="local">pager.help</i18n:text></fd:help>
			<fd:datatype base="string"/>
			<fd:validation>
				<fd:length min="2" max="50"/>
			</fd:validation>
		</fd:field>

		<fd:submit id="cancel" action-command="cancel" validate="false">
			<fd:label>Cancel</fd:label>
			<fd:hint><i18n:text i18n:catalogue="local">cancel.hint</i18n:text></fd:hint>
		</fd:submit> 

		<fd:submit id="done" action-command="done" validate="true">
			<fd:label>Send</fd:label>
			<fd:hint><i18n:text i18n:catalogue="local">submit.hint</i18n:text></fd:hint>
		</fd:submit> 



	</fd:widgets>
</fd:form>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<fd:form xmlns:fd="http://apache.org/cocoon/forms/1.0#definition" xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+    <fd:widgets>
+        <fd:messages id="messages">
+              <fd:label><i18n:text i18n:catalogue="local">message.label</i18n:text></fd:label>
+        </fd:messages>
+        <fd:field id="firstname" required="true">
+            <fd:label><i18n:text i18n:catalogue="local">field.firstname</i18n:text>:
</fd:label>
+            <fd:hint><i18n:text i18n:catalogue="local">firstname.hint</i18n:text></fd:hint>
+            <fd:help><i18n:text i18n:catalogue="local">firstname.help</i18n:text></fd:help>
+            <fd:datatype base="string">
+                <fd:validation>
+                    <fd:length min="2" max="50"/>
+                </fd:validation>
+            </fd:datatype>
+        </fd:field>
+        <fd:field id="lastname" required="true">
+            <fd:label><i18n:text i18n:catalogue="local">field.lastname</i18n:text>:
</fd:label>
+            <fd:hint><i18n:text i18n:catalogue="local">lastname.hint</i18n:text></fd:hint>
+            <fd:help><i18n:text i18n:catalogue="local">lastname.help</i18n:text></fd:help>
+            <fd:datatype base="string">
+                <fd:validation>
+                    <fd:length min="2" max="50"/>
+                </fd:validation>
+            </fd:datatype>
+        </fd:field>
+        <fd:field id="email" required="true">
+            <fd:label><i18n:text i18n:catalogue="local">field.email</i18n:text>:
</fd:label>
+            <fd:hint><i18n:text i18n:catalogue="local">email.hint</i18n:text></fd:hint>
+            <fd:help><i18n:text i18n:catalogue="local">email.help</i18n:text></fd:help>
+            <fd:datatype base="string">
+                <fd:validation>
+                    <fd:email/>
+                </fd:validation>
+            </fd:datatype>
+        </fd:field>
+        <fd:field id="deptName" required="true">
+            <fd:label><i18n:text i18n:catalogue="local">field.deptName</i18n:text>:
</fd:label>
+            <fd:hint><i18n:text i18n:catalogue="local">deptName.hint</i18n:text></fd:hint>
+            <fd:help><i18n:text i18n:catalogue="local">deptName.help</i18n:text></fd:help>
+            <fd:datatype base="string">
+                <fd:validation>
+                    <fd:length min="2" max="50"/>
+                </fd:validation>
+            </fd:datatype>
+        </fd:field>
+        <fd:field id="address1" required="true">
+            <fd:label><i18n:text i18n:catalogue="local">field.address1</i18n:text>:
</fd:label>
+            <fd:hint><i18n:text i18n:catalogue="local">address1.hint</i18n:text></fd:hint>
+            <fd:help><i18n:text i18n:catalogue="local">address1.help</i18n:text></fd:help>
+            <fd:datatype base="string"/>
+            <fd:validation>
+                <fd:length min="2" max="50"/>
+            </fd:validation>
+        </fd:field>
+        <fd:field id="address2" required="true">
+            <fd:label><i18n:text i18n:catalogue="local">field.address2</i18n:text>:
</fd:label>
+            <fd:hint><i18n:text i18n:catalogue="local">address2.hint</i18n:text></fd:hint>
+            <fd:help><i18n:text i18n:catalogue="local">address2.help</i18n:text></fd:help>
+            <fd:datatype base="string"/>
+            <fd:validation>
+                <fd:length min="2" max="50"/>
+            </fd:validation>
+        </fd:field>
+        <fd:field id="address3" required="true">
+            <fd:label><i18n:text i18n:catalogue="local">field.address3</i18n:text>:
</fd:label>
+            <fd:hint><i18n:text i18n:catalogue="local">address3.hint</i18n:text></fd:hint>
+            <fd:help><i18n:text i18n:catalogue="local">address3.help</i18n:text></fd:help>
+            <fd:datatype base="string"/>
+            <fd:validation>
+                <fd:length min="2" max="50"/>
+            </fd:validation>
+        </fd:field>
+        <fd:field id="postcode" required="true">
+            <fd:label><i18n:text i18n:catalogue="local">field.postcode</i18n:text>:
</fd:label>
+            <fd:hint><i18n:text i18n:catalogue="local">postcode.hint</i18n:text></fd:hint>
+            <fd:help><i18n:text i18n:catalogue="local">postcode.help</i18n:text></fd:help>
+            <fd:datatype base="string"/>
+            <fd:validation>
+                <fd:length min="2" max="50"/>
+            </fd:validation>
+        </fd:field>
+        <fd:field id="ophone" required="true">
+            <fd:label><i18n:text i18n:catalogue="local">field.ophone</i18n:text>:
</fd:label>
+            <fd:hint><i18n:text i18n:catalogue="local">ophone.hint</i18n:text></fd:hint>
+            <fd:help><i18n:text i18n:catalogue="local">ophone.help</i18n:text></fd:help>
+            <fd:datatype base="string"/>
+            <fd:validation>
+                <fd:length min="2" max="50"/>
+            </fd:validation>
+        </fd:field>
+        <fd:field id="fphone" required="false">
+            <fd:label><i18n:text i18n:catalogue="local">field.fphone</i18n:text>:
</fd:label>
+            <fd:hint><i18n:text i18n:catalogue="local">fphone.hint</i18n:text></fd:hint>
+            <fd:help><i18n:text i18n:catalogue="local">fphone.help</i18n:text></fd:help>
+            <fd:datatype base="string"/>
+            <fd:validation>
+                <fd:length min="2" max="50"/>
+            </fd:validation>
+        </fd:field>
+        <fd:field id="mphone" required="false">
+            <fd:label><i18n:text i18n:catalogue="local">field.mphone</i18n:text>:
</fd:label>
+            <fd:hint><i18n:text i18n:catalogue="local">mphone.hint</i18n:text></fd:hint>
+            <fd:help><i18n:text i18n:catalogue="local">mphone.help</i18n:text></fd:help>
+            <fd:datatype base="string"/>
+            <fd:validation>
+                <fd:length min="2" max="50"/>
+            </fd:validation>
+        </fd:field>
+        <fd:field id="hphone" required="false">
+            <fd:label><i18n:text i18n:catalogue="local">field.hphone</i18n:text>:
</fd:label>
+            <fd:hint><i18n:text i18n:catalogue="local">hphone.hint</i18n:text></fd:hint>
+            <fd:help><i18n:text i18n:catalogue="local">hphone.help</i18n:text></fd:help>
+            <fd:datatype base="string"/>
+            <fd:validation>
+                <fd:length min="2" max="50"/>
+            </fd:validation>
+        </fd:field>
+        <fd:field id="pager" required="false">
+            <fd:label><i18n:text i18n:catalogue="local">field.pager</i18n:text>:
</fd:label>
+            <fd:hint><i18n:text i18n:catalogue="local">pager.hint</i18n:text></fd:hint>
+            <fd:help><i18n:text i18n:catalogue="local">pager.help</i18n:text></fd:help>
+            <fd:datatype base="string"/>
+            <fd:validation>
+                <fd:length min="2" max="50"/>
+            </fd:validation>
+        </fd:field>
+        <fd:submit id="cancel" action-command="cancel" validate="false">
+            <fd:label>Cancel</fd:label>
+            <fd:hint><i18n:text i18n:catalogue="local">cancel.hint</i18n:text></fd:hint>
+        </fd:submit>
+        <fd:submit id="done" action-command="done" validate="true">
+            <fd:label>Send</fd:label>
+            <fd:hint><i18n:text i18n:catalogue="local">submit.hint</i18n:text></fd:hint>
+        </fd:submit>
+    </fd:widgets>
+</fd:form>

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/naming/samples/forms/person-model.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/naming/samples/xslt/forms.xsl
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/naming/samples/xslt/forms.xsl?rev=1413946&r1=1413945&r2=1413946&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/naming/samples/xslt/forms.xsl (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/naming/samples/xslt/forms.xsl Tue Nov 27 00:01:15
2012
@@ -1 +1,56 @@
-<?xml version="1.0"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<xsl:stylesheet
  version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:fi="http://apache.org/cocoon/forms/1.0#instance">

	<!--
	
		this is a modified copy of the stylesheet "forms-samples-styling.xsl" that comes with CForms
	
	-->



  <!--+ Include styling stylesheets, one for the widgets, the other one for the
      | page. As 'forms-advanced-field-styling.xsl' is a specialization of
      | 'forms-field-styling.xsl' the latter one is imported there. If you don't
      | want advanced styling of widgets, change it here!
      | See xsl:include as composition and xsl:import as extension/inheritance.
      +-->
  <xsl:include href="resource://org/apache/cocoon/forms/resources/forms-page-styling.xsl"/>
  <xsl:include href="resource://org/apache/cocoon/forms/resources/forms-advanced-field-styling.xsl"/>

	<xsl:param name="resources-uri">resources</xsl:param>

  <xsl:template match="head">
    <head>
      <xsl:apply-templates/>
      <xsl:apply-templates select="." mode="forms-page"/>
      <xsl:apply-templates select="." mode="forms-field"/>
    </head>
  </xsl:template>

  <xsl:template match="body">
    <body>
      <!--+ !!! If template with mode 'forms-page' adds text or elements
          |        template with mode 'forms-field' can no longer add attributes!!!
          +-->
      <xsl:apply-templates select="." mode="forms-page"/>
      <xsl:apply-templates select="." mode="forms-field"/>
      <xsl:apply-templates/>
    </body>
  </xsl:template>

	<xsl:template match="forms-help-image">
		<img src="{$resources-uri}/forms/img/help.gif" alt="helppopup"/>
	</xsl:template>

  <xsl:template match="fi:output" mode="label">
    <xsl:param name="id" select="@id"/>
    <label for="{$id}" title="{fi:hint}">
      <xsl:copy-of select="fi:label/node()"/>
    </label>
  </xsl:template>



</xsl:stylesheet>
\ No newline at end of file
+<?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!--
+  this is a modified copy of the stylesheet "forms-samples-styling.xsl" that comes with CForms
+-->
+<!--+ Include styling stylesheets, one for the widgets, the other one for the
+    | page. As 'forms-advanced-field-styling.xsl' is a specialization of
+    | 'forms-field-styling.xsl' the latter one is imported there. If you don't
+    | want advanced styling of widgets, change it here!
+    | See xsl:include as composition and xsl:import as extension/inheritance.
+    +-->
+  <xsl:include href="resource://org/apache/cocoon/forms/resources/forms-page-styling.xsl"/>
+  <xsl:include href="resource://org/apache/cocoon/forms/resources/forms-advanced-field-styling.xsl"/>
+  <xsl:param name="resources-uri">resources</xsl:param>
+  <xsl:template match="head">
+    <head>
+      <xsl:apply-templates/>
+      <xsl:apply-templates select="." mode="forms-page"/>
+      <xsl:apply-templates select="." mode="forms-field"/>
+    </head>
+  </xsl:template>
+  <xsl:template match="body">
+    <body>
+      <!--+ !!! If template with mode 'forms-page' adds text or elements
+          |        template with mode 'forms-field' can no longer add attributes!!!
+          +-->
+      <xsl:apply-templates select="." mode="forms-page"/>
+      <xsl:apply-templates select="." mode="forms-field"/>
+      <xsl:apply-templates/>
+    </body>
+  </xsl:template>
+  <xsl:template match="forms-help-image">
+    <img src="{$resources-uri}/forms/img/help.gif" alt="helppopup"/>
+  </xsl:template>
+  <xsl:template match="fi:output" mode="label">
+    <xsl:param name="id" select="@id"/>
+    <label for="{$id}" title="{fi:hint}">
+      <xsl:copy-of select="fi:label/node()"/>
+    </label>
+  </xsl:template>
+</xsl:stylesheet>

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/naming/samples/xslt/forms.xsl
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message