[Yanel-commits] rev 23421 - in public/yanel/trunk/src:
realms/use-cases/yanel/data realms/use-cases/yanel/data/xinclude
realms/use-cases/yanel/data-paths
realms/use-cases/yanel/data-paths/xinclude
realms/use-cases/yanel/data-paths/xinclude/index.html
realms/use-cases/yanel/data-paths/xinclude/test.xml
realms/use-cases/yanel/rti realms/use-cases/yanel/rti/xinclude
test/htmlunit/org/wyona/yanel/htmlunit
test/htmlunit/org/wyona/yanel/htmlunit/usecases
michi at wyona.com
michi at wyona.com
Tue Mar 27 11:32:18 CEST 2007
Author: michi
Date: 2007-03-27 11:32:16 +0200 (Tue, 27 Mar 2007)
New Revision: 23421
Added:
public/yanel/trunk/src/realms/use-cases/yanel/data-paths/xinclude/
public/yanel/trunk/src/realms/use-cases/yanel/data-paths/xinclude/index.html/
public/yanel/trunk/src/realms/use-cases/yanel/data-paths/xinclude/index.html/.yarep-uid
public/yanel/trunk/src/realms/use-cases/yanel/data-paths/xinclude/test.xml/
public/yanel/trunk/src/realms/use-cases/yanel/data-paths/xinclude/test.xml/.yarep-uid
public/yanel/trunk/src/realms/use-cases/yanel/data/xinclude/
public/yanel/trunk/src/realms/use-cases/yanel/data/xinclude/index.html
public/yanel/trunk/src/realms/use-cases/yanel/data/xinclude/test.xml
public/yanel/trunk/src/realms/use-cases/yanel/rti/xinclude/
public/yanel/trunk/src/realms/use-cases/yanel/rti/xinclude/index.html.yanel-rc
public/yanel/trunk/src/realms/use-cases/yanel/rti/xinclude/test.xml.yanel-rc
public/yanel/trunk/src/test/htmlunit/org/wyona/yanel/htmlunit/usecases/
public/yanel/trunk/src/test/htmlunit/org/wyona/yanel/htmlunit/usecases/XIncludeWebTest.java
Log:
xinclude sample and test added
Added: public/yanel/trunk/src/realms/use-cases/yanel/data/xinclude/index.html
===================================================================
--- public/yanel/trunk/src/realms/use-cases/yanel/data/xinclude/index.html 2007-03-27 09:18:01 UTC (rev 23420)
+++ public/yanel/trunk/src/realms/use-cases/yanel/data/xinclude/index.html 2007-03-27 09:32:16 UTC (rev 23421)
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Testing XInclude</title>
+ </head>
+ <body>
+ <h2>XInclude</h2>
+ <p>The content below is aggregated via XInclude:</p>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="yanelresource:/xinclude/test.xml"/>
+ </body>
+</html>
Added: public/yanel/trunk/src/realms/use-cases/yanel/data/xinclude/test.xml
===================================================================
--- public/yanel/trunk/src/realms/use-cases/yanel/data/xinclude/test.xml 2007-03-27 09:18:01 UTC (rev 23420)
+++ public/yanel/trunk/src/realms/use-cases/yanel/data/xinclude/test.xml 2007-03-27 09:32:16 UTC (rev 23421)
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+
+<div xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ This is the included content.
+ <br/>
+ special characters test: öäü & < >
+ </p>
+</div>
+
Added: public/yanel/trunk/src/realms/use-cases/yanel/data-paths/xinclude/index.html/.yarep-uid
===================================================================
--- public/yanel/trunk/src/realms/use-cases/yanel/data-paths/xinclude/index.html/.yarep-uid 2007-03-27 09:18:01 UTC (rev 23420)
+++ public/yanel/trunk/src/realms/use-cases/yanel/data-paths/xinclude/index.html/.yarep-uid 2007-03-27 09:32:16 UTC (rev 23421)
@@ -0,0 +1 @@
+xinclude/index.html
Added: public/yanel/trunk/src/realms/use-cases/yanel/data-paths/xinclude/test.xml/.yarep-uid
===================================================================
--- public/yanel/trunk/src/realms/use-cases/yanel/data-paths/xinclude/test.xml/.yarep-uid 2007-03-27 09:18:01 UTC (rev 23420)
+++ public/yanel/trunk/src/realms/use-cases/yanel/data-paths/xinclude/test.xml/.yarep-uid 2007-03-27 09:32:16 UTC (rev 23421)
@@ -0,0 +1 @@
+xinclude/test.xml
Added: public/yanel/trunk/src/realms/use-cases/yanel/rti/xinclude/index.html.yanel-rc
===================================================================
--- public/yanel/trunk/src/realms/use-cases/yanel/rti/xinclude/index.html.yanel-rc 2007-03-27 09:18:01 UTC (rev 23420)
+++ public/yanel/trunk/src/realms/use-cases/yanel/rti/xinclude/index.html.yanel-rc 2007-03-27 09:32:16 UTC (rev 23421)
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+
+<yanel:resource-config xmlns:yanel="http://www.wyona.org/yanel/rti/1.0">
+ <yanel:rti name="xml" namespace="http://www.wyona.org/yanel/resource/1.0"/>
+
+ <yanel:property name="mime-type" value="application/xhtml+xml"/>
+ <yanel:property name="xslt" value="/xslt/global.xsl"/>
+</yanel:resource-config>
Added: public/yanel/trunk/src/realms/use-cases/yanel/rti/xinclude/test.xml.yanel-rc
===================================================================
--- public/yanel/trunk/src/realms/use-cases/yanel/rti/xinclude/test.xml.yanel-rc 2007-03-27 09:18:01 UTC (rev 23420)
+++ public/yanel/trunk/src/realms/use-cases/yanel/rti/xinclude/test.xml.yanel-rc 2007-03-27 09:32:16 UTC (rev 23421)
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+
+<yanel:resource-config xmlns:yanel="http://www.wyona.org/yanel/rti/1.0">
+ <yanel:rti name="file" namespace="http://www.wyona.org/yanel/resource/1.0"/>
+
+ <yanel:property name="mime-type" value="text/xml"/>
+</yanel:resource-config>
Added: public/yanel/trunk/src/test/htmlunit/org/wyona/yanel/htmlunit/usecases/XIncludeWebTest.java
===================================================================
--- public/yanel/trunk/src/test/htmlunit/org/wyona/yanel/htmlunit/usecases/XIncludeWebTest.java 2007-03-27 09:18:01 UTC (rev 23420)
+++ public/yanel/trunk/src/test/htmlunit/org/wyona/yanel/htmlunit/usecases/XIncludeWebTest.java 2007-03-27 09:32:16 UTC (rev 23421)
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2006 Wyona
+ *
+ * Licensed 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.wyona.org/licenses/APACHE-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.
+ */
+package org.wyona.yanel.htmlunit.usecases;
+
+import org.wyona.yanel.htmlunit.AbstractHtmlUnitTest;
+
+/**
+ * Test which loads a page from the usecases realm which
+ * contains xincluded content.
+ */
+public class XIncludeWebTest extends AbstractHtmlUnitTest {
+
+ protected void setUp() throws Exception {
+ this.testName = "XInclude Web Test";
+ super.setUp();
+ }
+
+ /**
+ * Loads a yanel page and verifies its title.
+ */
+ public void testXInclude() throws Exception {
+ loadHtmlPage("test/use-cases/xinclude/index.html");
+ assertTitleEquals("Testing XInclude - Yanel");
+ assertPageContainsText("This is the included content.");
+ //assertPageContainsText("special characters test: öäü & < >");
+ }
+
+}
More information about the Yanel-commits
mailing list