Author: jdonnerstag
Date: Sat Feb 14 10:18:05 2009
New Revision: 744461

URL: http://svn.apache.org/viewvc?rev=744461&view=rev
Log:
fixed wicket-2074: Should the QuickStart archetype generated HomePage.html 
inlude the Wicket namespace in the html tag?

minor tweaks in wicket core classes

Modified:
    
wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.html
    
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/MarkupResourceData.java
    
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/parser/filter/WicketNamespaceHandler.java
    
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/transformer/XsltOutputTransformerContainer.java
    
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/transformer/XsltTransformerBehavior.java
    
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/outputTransformer/PageExpectedResult_1.html

Modified: 
wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.html
URL: 
http://svn.apache.org/viewvc/wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.html?rev=744461&r1=744460&r2=744461&view=diff
==============================================================================
--- 
wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.html
 (original)
+++ 
wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.html
 Sat Feb 14 10:18:05 2009
@@ -1,5 +1,5 @@
-<html>
-    <head>
+<html 
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd"; >
+    <head>  
         <title>Wicket Quickstart Archetype Homepage</title>
     </head>
     <body>

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/MarkupResourceData.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/MarkupResourceData.java?rev=744461&r1=744460&r2=744461&view=diff
==============================================================================
--- 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/MarkupResourceData.java
 (original)
+++ 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/MarkupResourceData.java
 Sat Feb 14 10:18:05 2009
@@ -49,7 +49,10 @@
        /** The encoding as found in <?xml ... encoding="" ?>. Null, else */
        private String encoding;
 
-       /** Wicket namespace: <html xmlns:wicket="http://wicket.apache.org";> */
+       /**
+        * Wicket namespace: <html
+        * 
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd>
+        */
        private String wicketNamespace;
 
        /** == wicket namespace name + ":id" */
@@ -66,6 +69,7 @@
        /**
         * @return String representation of markup list
         */
+       @Override
        public String toString()
        {
                if (resource != null)

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/parser/filter/WicketNamespaceHandler.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/parser/filter/WicketNamespaceHandler.java?rev=744461&r1=744460&r2=744461&view=diff
==============================================================================
--- 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/parser/filter/WicketNamespaceHandler.java
 (original)
+++ 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/parser/filter/WicketNamespaceHandler.java
 Sat Feb 14 10:18:05 2009
@@ -29,8 +29,9 @@
 
 
 /**
- * This is a markup inline filter. It determines the Wicket namespace name 
from the markup Examples
- * are xmlns:wicket or xmlns:wicket="http://wicket.apache.org";.
+ * This is a markup inline filter. It determines the Wicket namespace name 
from the markup. Examples
+ * are xmlns:wicket or 
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd";
+ * though every URI that starts with "http://wicket.apache.org"; will work as 
well.
  * 
  * @see org.apache.wicket.markup.MarkupParser
  * @author Juergen Donnerstag

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/transformer/XsltOutputTransformerContainer.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/transformer/XsltOutputTransformerContainer.java?rev=744461&r1=744460&r2=744461&view=diff
==============================================================================
--- 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/transformer/XsltOutputTransformerContainer.java
 (original)
+++ 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/transformer/XsltOutputTransformerContainer.java
 Sat Feb 14 10:18:05 2009
@@ -27,9 +27,8 @@
  * with an associated markup and must have a filename equal to the component's 
id.
  * <p>
  * The containers tag will be the root element of the xml data applied for 
transformation to ensure
- * the xml data are well formed (single root element). In addition the 
attribute
- * <code>xmlns:wicket="http://wicket.apache.org";</code> is added to the root 
element to allow the
- * XSL processor to handle the wicket namespace.
+ * the xml data are well formed (single root element). In addition the 
attribute 
<code>xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd</code>
+ * is added to the root element to allow the XSL processor to handle the 
wicket namespace.
  * <p>
  * Similar to this container, a <code>IBehavior</code> is available which does 
the same, but does
  * not require an additional Container.
@@ -73,7 +72,7 @@
                // Make the XSLT processor happy and allow him to handle the 
wicket
                // tags and attributes which are in the wicket namespace
                add(new AttributeModifier("xmlns:wicket", true, new 
Model<String>(
-                       "http://wicket.apache.org";)));
+                       
"http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd";)));
        }
 
        /**

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/transformer/XsltTransformerBehavior.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/transformer/XsltTransformerBehavior.java?rev=744461&r1=744460&r2=744461&view=diff
==============================================================================
--- 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/transformer/XsltTransformerBehavior.java
 (original)
+++ 
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/transformer/XsltTransformerBehavior.java
 Sat Feb 14 10:18:05 2009
@@ -28,9 +28,8 @@
  * id.
  * <p>
  * The containers tag will be the root element of the xml data applied for 
transformation to ensure
- * the xml data are well formed (single root element). In addition the 
attribute
- * <code>xmlns:wicket="http://wicket.apache.org";</code> is added to the root 
element to allow the
- * XSL processor to handle the wicket namespace.
+ * the xml data are well formed (single root element). In addition the 
attribute 
<code>xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd</code>
+ * is added to the root element to allow the XSL processor to handle the 
wicket namespace.
  * <p>
  * The reason why the transformer can not be used to XSLT the ListViews output 
is because of the
  * ListViews markup being reused for each ListItem. Please use a 
XsltOutputTransformerContainer
@@ -73,7 +72,7 @@
        @Override
        public void onComponentTag(final Component component, final 
ComponentTag tag)
        {
-               tag.put("xmlns:wicket", "http://wicket.apache.org";);
+               tag.put("xmlns:wicket", 
"http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd";);
 
                // Make the XSLT processor happy and allow it to handle the 
wicket tags
                // and attributes that are in the wicket namespace

Modified: 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/outputTransformer/PageExpectedResult_1.html
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/outputTransformer/PageExpectedResult_1.html?rev=744461&r1=744460&r2=744461&view=diff
==============================================================================
--- 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/outputTransformer/PageExpectedResult_1.html
 (original)
+++ 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/outputTransformer/PageExpectedResult_1.html
 Sat Feb 14 10:18:05 2009
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 
 <!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
@@ -13,7 +13,7 @@
   <span wicket:id="test">body<span wicket:id="myLabel2">Test 
Label2</span></span>
   <span wicket:id="test2">Whatever</span>
   <span wicket:id="test3"><WICKET:BORDER>BEFORE BODY - 
<WICKET:BODY>BORDER</WICKET:BODY> - AFTER BODY</WICKET:BORDER></span>
-  <span xmlns:wicket="http://wicket.apache.org"; wicket:id="test4"><span 
wicket:id="myBorder2" testAttr="myValue"><wicket:border>before body - 
<wicket:body>border</wicket:body> - after body</wicket:border></span></span>
-  <span xmlns:wicket="http://wicket.apache.org"; wicket:id="test5"><span 
wicket:id="myBorder3" testAttr="myValue"><wicket:border>before body - 
<wicket:body>border</wicket:body> - after body</wicket:border></span></span>
+  <span 
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd"; 
wicket:id="test4"><span wicket:id="myBorder2" 
testAttr="myValue"><wicket:border>before body - 
<wicket:body>border</wicket:body> - after body</wicket:border></span></span>
+  <span 
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd"; 
wicket:id="test5"><span wicket:id="myBorder3" 
testAttr="myValue"><wicket:border>before body - 
<wicket:body>border</wicket:body> - after body</wicket:border></span></span>
 </body>
 </html>


Reply via email to