[Yanel-dev] Re: [Wyona-commits] rev 30845 - public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/resources

Michael Wechner michael.wechner at wyona.com
Mon Jan 28 11:37:09 CET 2008


Sorry if might have checked in this wrong. But what is the logic behind 
this order? Could you add a comment explaing why it has to be this 
order? ;-)

Thanks

Michi

josias at wyona.com wrote:

>Author: josias
>Date: 2008-01-28 10:54:54 +0100 (Mon, 28 Jan 2008)
>New Revision: 30845
>
>Modified:
>   public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java
>Log:
>serializer: changed order of checks for xhtml-strict and xml. now mime-type application/xhtml+xml uses the xhtml-strict serializer, as it was before.
>
>Modified: public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java
>===================================================================
>--- public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java	2008-01-28 09:48:57 UTC (rev 30844)
>+++ public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java	2008-01-28 09:54:54 UTC (rev 30845)
>@@ -236,7 +236,6 @@
>             if (xsltPaths == null || xsltPaths.length == 0) {
>                 xsltPaths = getXSLTPath(getPath());
>             }
>-            
>             SourceResolver uriResolver = new SourceResolver(this);
>             
>             TransformerHandler[] xsltHandlers = new TransformerHandler[xsltPaths.length];
>@@ -305,12 +304,12 @@
> 
>             if (MimeTypeUtil.isHTML(mimeType) && !MimeTypeUtil.isXML(mimeType)) {
>                 serializer = SerializerFactory.getSerializer(SerializerFactory.HTML_TRANSITIONAL);
>+            } else if (MimeTypeUtil.isHTML(mimeType) && MimeTypeUtil.isXML(mimeType)){
>+                serializer = SerializerFactory.getSerializer(SerializerFactory.XHTML_STRICT);
>             } else if (MimeTypeUtil.isXML(mimeType)) {
>                 serializer = SerializerFactory.getSerializer(SerializerFactory.XML);
>             } else if (MimeTypeUtil.isTextual(mimeType)) {
>                 serializer = SerializerFactory.getSerializer(SerializerFactory.TEXT);
>-            } else if (MimeTypeUtil.isHTML(mimeType) && MimeTypeUtil.isXML(mimeType)){
>-                serializer = SerializerFactory.getSerializer(SerializerFactory.XHTML_STRICT);
>             } else{
>                 // For backwards compatibility leave XHTML as default
>                 serializer = SerializerFactory.getSerializer(SerializerFactory.XHTML_STRICT);
>
>_______________________________________________
>Wyona-commits mailing list
>Wyona-commits at wyona.com
>http://lists.wyona.org/cgi-bin/mailman/listinfo/wyona-commits
>  
>


-- 
Michael Wechner
Wyona      -   Open Source Content Management - Yanel, Yulup
http://www.wyona.com
michael.wechner at wyona.com, michi at apache.org
+41 44 272 91 61



More information about the Yanel-development mailing list