Added: 
struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/util/xml/validation/SchemaValidatorFactory.java
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/util/xml/validation/SchemaValidatorFactory.java?rev=290802&view=auto
==============================================================================
--- 
struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/util/xml/validation/SchemaValidatorFactory.java
 (added)
+++ 
struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/util/xml/validation/SchemaValidatorFactory.java
 Wed Sep 21 12:42:20 2005
@@ -0,0 +1,35 @@
+/*
+ * B E A   S Y S T E M S
+ * Copyright 2002-2004  BEA Systems, Inc.
+ *
+ * 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.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.
+ *
+ * $Header:$
+ */
+package org.apache.ti.util.xml.validation;
+
+import org.apache.ti.util.xml.validation.SchemaValidator;
+import org.apache.ti.util.xml.validation.internal.DefaultSchemaValidator;
+
+/**
+ */
+public class SchemaValidatorFactory {
+    public static SchemaValidator getInstance() {
+        // For now, this is not pluggable.  It is in Beehive, but does it need 
to be here?
+        return new DefaultSchemaValidator();
+    }
+
+    /* do not construct */
+    private SchemaValidatorFactory() {
+    }
+}

Added: 
struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/util/xml/validation/internal/DefaultSchemaValidator.java
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/util/xml/validation/internal/DefaultSchemaValidator.java?rev=290802&view=auto
==============================================================================
--- 
struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/util/xml/validation/internal/DefaultSchemaValidator.java
 (added)
+++ 
struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/util/xml/validation/internal/DefaultSchemaValidator.java
 Wed Sep 21 12:42:20 2005
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * 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.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.
+ *
+ * $Header:$
+ */
+package org.apache.ti.util.xml.validation.internal;
+
+import org.apache.ti.util.xml.LocalFileEntityResolver;
+import org.apache.ti.util.xml.validation.SchemaValidationException;
+import org.apache.ti.util.xml.validation.SchemaValidator;
+
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+import org.xml.sax.helpers.DefaultHandler;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+public class DefaultSchemaValidator
+        extends SchemaValidator {
+    public void validate(InputStream xmlInputStream, String 
schemaResourcePath) {
+        try {
+            LocalFileEntityResolver entityResolver = new 
LocalFileEntityResolver(schemaResourcePath);
+            InputStream in = 
Thread.currentThread().getContextClassLoader().getResourceAsStream(schemaResourcePath);
+
+            if (in == null) {
+                in = 
DefaultSchemaValidator.class.getClassLoader().getResourceAsStream(schemaResourcePath);
+            }
+
+            if (in == null) {
+                throw new SchemaValidationException("Could not parse document 
because schema was not found at " +
+                                                    schemaResourcePath);
+            }
+
+            InputSource schemaInput = 
entityResolver.resolveLocalEntity(schemaResourcePath);
+            DocumentBuilderFactory factory = 
DocumentBuilderFactory.newInstance();
+            factory.setNamespaceAware(true);
+            factory.setValidating(true);
+            
factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaLanguage";, 
"http://www.w3.org/2001/XMLSchema";);
+            
factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaSource";, 
schemaInput);
+
+            DocumentBuilder builder = factory.newDocumentBuilder();
+            builder.setEntityResolver(entityResolver);
+
+            Validator handler = new Validator();
+            builder.setErrorHandler(handler);
+            builder.parse(xmlInputStream);
+
+            SAXParseException e = handler.getException();
+
+            if (e != null) {
+                throw new SchemaValidationException("Error parsing document", 
e);
+            }
+        } catch (ParserConfigurationException e) {
+            throw new SchemaValidationException("Error parsing document", e);
+        } catch (SAXException e) {
+            throw new SchemaValidationException("Error parsing document", e);
+        } catch (IOException e) {
+            throw new SchemaValidationException("Error parsing document", e);
+        }
+    }
+
+    private static class Validator
+            extends DefaultHandler {
+        private SAXParseException _exception;
+
+        public SAXParseException getException() {
+            return _exception;
+        }
+
+        public void fatalError(SAXParseException e) throws SAXException {
+            _exception = e;
+        }
+
+        public void error(SAXParseException e) throws SAXException {
+            _exception = e;
+        }
+    }
+}

Modified: struts/sandbox/trunk/ti/project.xml
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/project.xml?rev=290802&r1=290801&r2=290802&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/project.xml (original)
+++ struts/sandbox/trunk/ti/project.xml Wed Sep 21 12:42:20 2005
@@ -449,27 +449,6 @@
       <url>http://www.saxpath.org</url>
     </dependency>
 
-       <!-- XML Beans -->
-    <dependency>
-      <groupId>xmlbeans</groupId>
-      <artifactId>xbean</artifactId>
-      <version>2.0.0</version>
-      <url>http://xmlbeans.apache.org/</url>
-      <properties>
-        <war.bundle>true</war.bundle>
-      </properties>
-    </dependency>
-
-    <dependency>
-      <groupId>xmlbeans</groupId>
-      <artifactId>xmlbeans-jsr173-api</artifactId>
-      <version>2.0-dev</version>
-      <url>http://xmlbeans.apache.org/</url>
-      <properties>
-        <war.bundle>true</war.bundle>
-      </properties>
-    </dependency>
-
        <!-- JavaServer Faces -->
     <dependency>
       <groupId>myfaces</groupId>
@@ -489,45 +468,6 @@
     </dependency>
 
     <dependency>
-      <groupId>pageflow</groupId>
-      <artifactId>schema-netui-config</artifactId>
-      <version>1.0</version>
-      <url>http://beehive.apache.org/</url>
-      <properties>
-        <war.bundle>true</war.bundle>
-      </properties>
-    </dependency>
-
-    <dependency>
-      <groupId>pageflow</groupId>
-      <artifactId>schema-processed-annotations</artifactId>
-      <version>1.0</version>
-      <url>http://beehive.apache.org/</url>
-      <properties>
-        <war.bundle>true</war.bundle>
-      </properties>
-    </dependency>
-
-    <dependency>
-      <groupId>pageflow</groupId>
-      <artifactId>schema-url-template</artifactId>
-      <version>1.0</version>
-      <url>http://beehive.apache.org/</url>
-      <properties>
-        <war.bundle>true</war.bundle>
-      </properties>
-    </dependency>
-
-    <dependency>
-      <groupId>pageflow</groupId>
-      <artifactId>schema-commons-validator</artifactId>
-      <version>1.1</version>
-      <properties>
-        <war.bundle>true</war.bundle>
-      </properties>
-    </dependency>
-
-   <dependency>
         <groupId>sun</groupId>
         <artifactId>tools</artifactId>
         <version>1.5</version>

Modified: 
struts/sandbox/trunk/ti/wars/samples-jsf/src/java/jsf/physiciansFlow/Controller.java
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/wars/samples-jsf/src/java/jsf/physiciansFlow/Controller.java?rev=290802&r1=290801&r2=290802&view=diff
==============================================================================
--- 
struts/sandbox/trunk/ti/wars/samples-jsf/src/java/jsf/physiciansFlow/Controller.java
 (original)
+++ 
struts/sandbox/trunk/ti/wars/samples-jsf/src/java/jsf/physiciansFlow/Controller.java
 Wed Sep 21 12:42:20 2005
@@ -36,7 +36,8 @@
 @ti.controller(
     simpleActions={
         @ti.simpleAction(name="begin", action="physicianSearch"),
-        @ti.simpleAction(name="physicianSearch", path="search.faces")
+        @ti.simpleAction(name="physicianSearch", path="search.faces"),
+        @ti.simpleAction(name="returnToPreviousPage", 
navigateTo=ti.NavigateTo.previousPage)
     },
     sharedFlowRefs={
         @ti.sharedFlowRef(name="shared", 
type=org.apache.ti.samples.jsf.SharedFlow.class)

Modified: 
struts/sandbox/trunk/ti/wars/samples-xdoclet/src/webapp/WEB-INF/struts-ti-config.xml
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/wars/samples-xdoclet/src/webapp/WEB-INF/struts-ti-config.xml?rev=290802&r1=290801&r2=290802&view=diff
==============================================================================
--- 
struts/sandbox/trunk/ti/wars/samples-xdoclet/src/webapp/WEB-INF/struts-ti-config.xml
 (original)
+++ 
struts/sandbox/trunk/ti/wars/samples-xdoclet/src/webapp/WEB-INF/struts-ti-config.xml
 Wed Sep 21 12:42:20 2005
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<netui-config xmlns="http://struts.apache.org/ti/2004/server/config";>
+<ti-config xmlns="http://struts.apache.org/ti/2005/server/config";>
 
     <expression-languages>
         <default-language>netuiel</default-language>
@@ -36,4 +36,4 @@
         </login-handler>
     </pageflow-handlers>
 
-</netui-config>
+</ti-config>

Modified: 
struts/sandbox/trunk/ti/wars/samples-xdoclet/src/webapp/pageflow/loginexample/start/begin.jsp
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/wars/samples-xdoclet/src/webapp/pageflow/loginexample/start/begin.jsp?rev=290802&r1=290801&r2=290802&view=diff
==============================================================================
--- 
struts/sandbox/trunk/ti/wars/samples-xdoclet/src/webapp/pageflow/loginexample/start/begin.jsp
 (original)
+++ 
struts/sandbox/trunk/ti/wars/samples-xdoclet/src/webapp/pageflow/loginexample/start/begin.jsp
 Wed Sep 21 12:42:20 2005
@@ -38,7 +38,7 @@
             <li>
                 All login-related behavior (current user, login, logout, etc.) 
is defined by
                 
<code>org.apache.beehive.samples.netui.loginexample.ExampleLoginHandler</code>, 
which
-                is registered as the login handler in 
WEB-INF/beehive-netui-config.xml.  This overrides the
+                is registered as the login handler in 
WEB-INF/struts-ti-config.xml.  This overrides the
                 default behavior, which is to use the current Servlet 
container's login mechanism.
             </li>
             <li>

Modified: 
struts/sandbox/trunk/ti/wars/samples/src/webapp/WEB-INF/struts-ti-config.xml
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/wars/samples/src/webapp/WEB-INF/struts-ti-config.xml?rev=290802&r1=290801&r2=290802&view=diff
==============================================================================
--- 
struts/sandbox/trunk/ti/wars/samples/src/webapp/WEB-INF/struts-ti-config.xml 
(original)
+++ 
struts/sandbox/trunk/ti/wars/samples/src/webapp/WEB-INF/struts-ti-config.xml 
Wed Sep 21 12:42:20 2005
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<netui-config xmlns="http://struts.apache.org/ti/2004/server/config";>
+<ti-config xmlns="http://struts.apache.org/ti/2005/server/config";>
 
     <expression-languages>
         <default-language>netuiel</default-language>
@@ -36,4 +36,4 @@
         </login-handler>
     </pageflow-handlers>
 
-</netui-config>
+</ti-config>

Modified: 
struts/sandbox/trunk/ti/wars/samples/src/webapp/pageflow/loginexample/start/begin.jsp
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/wars/samples/src/webapp/pageflow/loginexample/start/begin.jsp?rev=290802&r1=290801&r2=290802&view=diff
==============================================================================
--- 
struts/sandbox/trunk/ti/wars/samples/src/webapp/pageflow/loginexample/start/begin.jsp
 (original)
+++ 
struts/sandbox/trunk/ti/wars/samples/src/webapp/pageflow/loginexample/start/begin.jsp
 Wed Sep 21 12:42:20 2005
@@ -38,7 +38,7 @@
             <li>
                 All login-related behavior (current user, login, logout, etc.) 
is defined by
                 
<code>org.apache.beehive.samples.netui.loginexample.ExampleLoginHandler</code>, 
which
-                is registered as the login handler in 
WEB-INF/beehive-netui-config.xml.  This overrides the
+                is registered as the login handler in 
WEB-INF/struts-ti-config.xml.  This overrides the
                 default behavior, which is to use the current Servlet 
container's login mechanism.
             </li>
             <li>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to