Introduce XSL URI Resolver
authorMathieu Baudier <mbaudier@argeo.org>
Thu, 3 Jul 2008 22:23:39 +0000 (22:23 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Thu, 3 Jul 2008 22:23:39 +0000 (22:23 +0000)
git-svn-id: https://svn.argeo.org/slc/trunk@1350 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

org.argeo.slc.webapp/src/main/webapp/WEB-INF/log4j.properties
org.argeo.slc.webapp/src/main/webapp/WEB-INF/slc-jsp/resultCollectionList.jsp
org.argeo.slc.webapp/src/main/webapp/WEB-INF/slc-jsp/resultList.jsp
org.argeo.slc.webapp/src/main/webapp/WEB-INF/slc-web-servlet.xml
org.argeo.slc.webapp/src/main/webapp/WEB-INF/slc-ws-servlet.xml
org.argeo.slc.webapp/src/main/webapp/WEB-INF/xslt-servlet.xml
org.argeo.slc.webapp/src/main/webapp/WEB-INF/xslt/resultView.xsl
org.argeo.slc.webapp/src/main/webapp/WEB-INF/xslt/viewXml.xsl [new file with mode: 0644]

index 32f4cc5cba63693ce3509780761b6f352e04f5a1..95a344f05b9cf15adbce1691dcddcd79334f8c0a 100644 (file)
@@ -3,7 +3,7 @@ log4j.rootLogger=WARN, console
 \r
 ## Levels\r
 # Slc\r
-log4j.logger.org.argeo.slc=DEBUG\r
+log4j.logger.org.argeo.slc=TRACE\r
 \r
 # Spring\r
 log4j.logger.org.springframework=WARN\r
index 9b11de4bdc57cc16f7ccacccace20c0ec2e321a9..576361f231a390439ed9a8a83a01aa6d1c818d4d 100644 (file)
        <c:forEach items="${resultCollections}" var="resultCollection">\r
                <tr>\r
                        <td>${resultCollection.id}</td>\r
-                       <td><a\r
-                               href="resultCollectionView.web?id=${resultCollection.id}">view</a></td>\r
+                       <td><a
+                               href="resultCollectionView.web?id=${resultCollection.id}">view</a></td>
+                       <td><a
+                               href="resultCollectionViewXml.xslt?id=${resultCollection.id}">xml</a></td>
                </tr>\r
        </c:forEach>\r
 </table>\r
index 3ae2101dd83a3ca085a753b406354a8c1b73a9ab..e4e516a8b83273b872093f02ac77315e1630eace 100644 (file)
@@ -20,7 +20,8 @@
                                </c:otherwise>\r
                        </c:choose>\r
                        <td style="padding-right: 5px"><a href="resultView.web?uuid=${result.uuid}">view</a></td>\r
-                       <td><a href="resultView.xslt?uuid=${result.uuid}">xsl</a></td>\r
+                       <td><a href="resultView.xslt?uuid=${result.uuid}">xsl</a></td>
+                       <td><a href="resultViewXml.xslt?uuid=${result.uuid}">xml</a></td>
                </tr>\r
        </c:forEach>\r
 </table>\r
index c8278fbd0b8b2782d434afb440e03c71b9faa448..a334e911ce5ba69f04aa197fcc1254d6200a0e38 100644 (file)
@@ -1,9 +1,9 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans xmlns="http://www.springframework.org/schema/beans"\r
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-       xmlns:aop="http://www.springframework.org/schema/aop"\r
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"\r
-       default-lazy-init="true">
-       
-       <import resource="classpath:/org/argeo/slc/server/spring/slc-web-servlet.xml"/>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
+
+       <import
+               resource="classpath:/org/argeo/slc/server/spring/slc-web-servlet.xml" />
 </beans>
\ No newline at end of file
index 755973f0728b9a8c0e52bebc4ffa819ec1fec735..18dce9a8a2cc03460055c40607abf1db654e1227 100644 (file)
@@ -1,8 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>\r
 <beans xmlns="http://www.springframework.org/schema/beans"\r
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"\r
-       default-lazy-init="true">\r
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
 \r
        <import resource="classpath:/org/argeo/slc/server/spring/slc-ws-servlet.xml"/>
 </beans>
\ No newline at end of file
index e8e1d7ebf3b0f74270e5a03e2e13abfd51bc1f96..34ae15987110932ae0245f0718d488edfb5c5d30 100644 (file)
@@ -1,9 +1,29 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans xmlns="http://www.springframework.org/schema/beans"\r
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-       xmlns:aop="http://www.springframework.org/schema/aop"\r
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"\r
-       default-lazy-init="true">\r
-\r
-       <import resource="classpath:/org/argeo/slc/server/spring/slc-xslt-servlet.xml"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
+
+       <import
+               resource="classpath:/org/argeo/slc/server/spring/slc-xslt-servlet.xml" />
+
+       <bean name="/resultView.xslt"
+               class="org.argeo.slc.web.mvc.result.ResultViewController">
+               <constructor-arg ref="testResultDao" />
+               <property name="viewName" value="resultView" />
+       </bean>
+
+       <bean name="/resultViewXml.xslt"
+               class="org.argeo.slc.web.mvc.result.ResultViewController">
+               <constructor-arg ref="testResultDao" />
+               <property name="viewName" value="viewXml" />
+       </bean>
+
+       <bean name="/resultCollectionViewXml.xslt"
+               class="org.argeo.slc.web.mvc.result.ResultCollectionViewController">
+               <constructor-arg ref="testResultCollectionDao" />
+               <property name="viewName" value="viewXml" />
+       </bean>
+
+
 </beans>
\ No newline at end of file
index 947cef0f9fe770462f7337d9352ddbfa9f8c75f1..e9989bdbec61a30785500142bd4bd2bde44cfdcf 100644 (file)
@@ -4,7 +4,8 @@
        xmlns:slc="http://argeo.org/projects/slc/schemas"\r
        exclude-result-prefixes="slc">\r
 \r
-       <xsl:output method="html" omit-xml-declaration="yes" />\r
+       <xsl:output method="html" omit-xml-declaration="yes" />
+       
 \r
        <xsl:template match="/">\r
                <html>\r
diff --git a/org.argeo.slc.webapp/src/main/webapp/WEB-INF/xslt/viewXml.xsl b/org.argeo.slc.webapp/src/main/webapp/WEB-INF/xslt/viewXml.xsl
new file mode 100644 (file)
index 0000000..87d6371
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<xsl:stylesheet version="1.0"\r
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform"\r
+       xmlns:slc="http://argeo.org/projects/slc/schemas"\r
+       exclude-result-prefixes="slc">\r
+\r
+       <xsl:template match="/">
+               <xsl:copy-of select="*"/>\r
+       </xsl:template>\r
+</xsl:stylesheet>
\ No newline at end of file