giacomo 00/07/17 14:06:15 Modified: samples/stylesheets Tag: xml-cocoon2 simple-status.xsl src/org/apache/cocoon/components/language/markup/sitemap Tag: xml-cocoon2 SitemapMarkupLanguage.java src/org/apache/cocoon/components/language/markup/sitemap/java Tag: xml-cocoon2 sitemap.xsl src/org/apache/cocoon/matching Tag: xml-cocoon2 BrowserMatcherFactory.java Matcher.java MatcherFactory.java WildcardURIMatcherFactory.java src/org/apache/cocoon/selection Tag: xml-cocoon2 BrowserSelectorFactory.java Selector.java SelectorFactory.java src/org/apache/cocoon/serialization Tag: xml-cocoon2 FO2PDFSerializer.java src/org/apache/cocoon/sitemap Tag: xml-cocoon2 AbstractSitemapProcessor.java ResourcePipeline.java XSLTMatcherFactoryLoader.java XSLTSelectorFactoryLoader.java xdocs/drafts Tag: xml-cocoon2 sitemap-working-draft.xmap Log: Revision Changes Path No revision No revision 1.1.2.2 +7 -7 xml-cocoon/samples/stylesheets/Attic/simple-status.xsl Index: simple-status.xsl =================================================================== RCS file: /home/cvs/xml-cocoon/samples/stylesheets/Attic/simple-status.xsl,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- simple-status.xsl 2000/07/12 22:16:43 1.1.2.1 +++ simple-status.xsl 2000/07/17 21:06:10 1.1.2.2 @@ -1,10 +1,10 @@ - - - + + - + @@ -15,7 +15,7 @@ - + No revision No revision 1.1.2.3 +258 -258 xml-cocoon/src/org/apache/cocoon/components/language/markup/sitemap/Attic/SitemapMarkupLanguage.java Index: SitemapMarkupLanguage.java =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/markup/sitemap/Attic/SitemapMarkupLanguage.java,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -r1.1.2.2 -r1.1.2.3 --- SitemapMarkupLanguage.java 2000/07/06 18:53:20 1.1.2.2 +++ SitemapMarkupLanguage.java 2000/07/17 21:06:10 1.1.2.3 @@ -1,258 +1,258 @@ -/***************************************************************************** - * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * - *****************************************************************************/ -package org.apache.cocoon.components.language.markup.sitemap; - -import java.io.File; -import java.util.Date; -import java.util.Vector; -import java.util.Hashtable; - -import org.w3c.dom.Node; -import org.w3c.dom.Text; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.NodeList; -import org.w3c.dom.ProcessingInstruction; - -import org.apache.cocoon.util.DOMUtils; -import org.apache.cocoon.components.language.markup.AbstractMarkupLanguage; - -import org.apache.cocoon.components.language.programming.ProgrammingLanguage; - - -import java.io.IOException; -import org.xml.sax.SAXException; - -/** - * This class implements MarkupLanguage for Cocoon's - * Sitemap. - * - * @author Giacomo Pati - * @version CVS $Revision: 1.1.2.2 $ $Date: 2000/07/06 18:53:20 $ - */ -public class SitemapMarkupLanguage extends AbstractMarkupLanguage { - /** - * The default constructor. - */ - public SitemapMarkupLanguage() throws SAXException, IOException { - super(); - } - - /** - * Return the Sitemap language name: map :-) - * - * @return The map constant - */ - public String getName() { - return "map"; - } - - /** - * Return the document-declared encoding or null if it's the - * platform's default encoding - * - * @param document The input document - * @return The document-declared encoding - */ - public String getEncoding(Document document) { - String encoding = document.getDocumentElement().getAttribute("encoding"); - - if (encoding.length() > 0) { - return encoding; - } - - return null; - } - - /** - * Prepare the document for logicsheet processing and code generation. This - * method sets the base filename, file path and creation date as root element - * attibutes and encodes text nodes as strings. - * - * @param document The input document - * @param filename The input source filename - * @param language The target programming language - * @return The augmented document - */ - protected Document preprocessDocument( - Document document, String filename, ProgrammingLanguage language - ) - { - // Store path and file name - int pos = filename.lastIndexOf(File.separatorChar); - String name = filename.substring(pos + 1); - String path = filename.substring(0, pos).replace(File.separatorChar, '/'); - - Element root = document.getDocumentElement(); - - root.setAttribute("file-name", name); - root.setAttribute("file-path", path); - root.setAttribute("creation-date", String.valueOf(new Date().getTime())); - - this.quoteStrings(document, language); - - return document; - } - - /** - * Encode text nodes as strings according to the target programming languages - * string constant escaping rules. - * - * @param node The node to be escaped - * @param language The target programming language - */ - protected void quoteStrings(Node node, ProgrammingLanguage language) { - switch (node.getNodeType()) { - case Node.PROCESSING_INSTRUCTION_NODE: - ProcessingInstruction pi = (ProcessingInstruction) node; - if (!pi.getTarget().equals("xml-logicsheet")) { - pi.setData(language.quoteString(pi.getData())); - } - break; - case Node.TEXT_NODE: - if (true) break; // the sitemap shouldn't have any text node - Element parent = (Element) node.getParentNode(); - - String tagName = parent.getTagName(); - - if ( - tagName.equals("xsp:expr") || - tagName.equals("xsp:logic") || - tagName.equals("xsp:structure") || - tagName.equals("xsp:include") - ) { - return; - } - - String value = language.quoteString(node.getNodeValue()); - Text textNode = node.getOwnerDocument().createTextNode(value); - - Element textElement = node.getOwnerDocument().createElement("xsp:text"); - - textElement.appendChild(textNode); - parent.replaceChild(textElement, node); - - break; - case Node.ELEMENT_NODE: - ((Element) node).normalize(); - // Fall through - default: - NodeList childList = node.getChildNodes(); - int childCount = childList.getLength(); - - for (int i = 0; i < childCount; i++) { - this.quoteStrings(childList.item(i), language); - } - - break; - } - } - - /** - * Returns a list of logicsheets to be applied to this document for source - * code generation. This method scans the input document for - * <?xml-logicsheet?> processing instructions and top-level - * <xsp:logicsheet> elements. Logicsheet declarations are removed from - * the input document. - * - * @param document The input document - * @return An array of logicsheet names - */ - protected String[] getLogicsheets(Document document) { - Vector removedNodes = new Vector(); - Vector logicsheetList = new Vector(); - Element root = document.getDocumentElement(); - - // Retrieve logicsheets declared by processing-instruction - NodeList nodeList = document.getChildNodes(); - int count = nodeList.getLength(); - for (int i = 0; i < count; i++) { - Node node = nodeList.item(i); - if (node.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE) { - ProcessingInstruction pi = (ProcessingInstruction) node; - - if (pi.getTarget().equals("xml-logicsheet")) { - Hashtable attrs = DOMUtils.getPIPseudoAttributes(pi); - logicsheetList.addElement(attrs.get("href")); - - removedNodes.addElement(pi); - } - } - } - - // Retrieve logicsheets declared by top-level elements - nodeList = root.getElementsByTagName("map:logicsheet"); - count = nodeList.getLength(); - - for (int i = 0; i < count; i++) { - Element logicsheetElement = (Element) nodeList.item(i); - removedNodes.addElement(logicsheetElement); - logicsheetList.addElement(logicsheetElement.getAttribute("location")); - } - - String[] logicsheetLocations = new String[logicsheetList.size()]; - logicsheetList.copyInto(logicsheetLocations); - - - // Remove logicsheet directives - count = removedNodes.size(); - for (int i = 0; i < count; i++) { - Node node = (Node) removedNodes.elementAt(i); - Node parent = node.getParentNode(); - parent.removeChild(node); - } - - return logicsheetLocations; - } - - /** - * Add a dependency on an external file to the document for inclusion in - * generated code. This is used by AbstractServerPagesGenerator - * to populate a list of File's tested for change on each - * invocation; this information, in turn, is used by - * ServerPagesLoaderImpl to assert whether regeneration is - * necessary. XSP uses <xsp:dependency> elements for this purpose - * - * @param PARAM_NAME Param description - * @return the value - * @exception EXCEPTION_NAME If an error occurs - * @see ServerPages AbstractServerPagesGenerator - * and ServerPagesLoaderImpl - */ -/** Sitemaps don't (yet) have dependencies */ - protected void addDependency(Document document, String location) { - Element root = document.getDocumentElement(); - Element dependency = document.createElement("xsp:dependency"); - dependency.appendChild(document.createTextNode(location)); - root.appendChild(dependency); - } -/* */ - - /** - * Scan top-level document elements for non-xsp tag names returning the first - * (and hopefully only) user-defined element - * - * @param document The input document - * @return The first non-xsp element - */ -/** Sitemaps don't have a user root - protected Element getUserRoot(Document document) { - Element root = document.getDocumentElement(); - NodeList elements = root.getElementsByTagName("*"); - int elementCount = elements.getLength(); - for (int i = 0; i < elementCount; i++) { - Element userRoot = (Element) elements.item(i); - if (!userRoot.getTagName().startsWith("map:")) { - return userRoot; - } - } - - return null; - } -*/ -} +/***************************************************************************** + * Copyright (C) The Apache Software Foundation. All rights reserved. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * + *****************************************************************************/ +package org.apache.cocoon.components.language.markup.sitemap; + +import java.io.File; +import java.util.Date; +import java.util.Vector; +import java.util.Hashtable; + +import org.w3c.dom.Node; +import org.w3c.dom.Text; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NodeList; +import org.w3c.dom.ProcessingInstruction; + +import org.apache.cocoon.util.DOMUtils; +import org.apache.cocoon.components.language.markup.AbstractMarkupLanguage; + +import org.apache.cocoon.components.language.programming.ProgrammingLanguage; + + +import java.io.IOException; +import org.xml.sax.SAXException; + +/** + * This class implements MarkupLanguage for Cocoon's + * Sitemap. + * + * @author Giacomo Pati + * @version CVS $Revision: 1.1.2.3 $ $Date: 2000/07/17 21:06:10 $ + */ +public class SitemapMarkupLanguage extends AbstractMarkupLanguage { + /** + * The default constructor. + */ + public SitemapMarkupLanguage() throws SAXException, IOException { + super(); + } + + /** + * Return the Sitemap language name: map :-) + * + * @return The map constant + */ + public String getName() { + return "map"; + } + + /** + * Return the document-declared encoding or null if it's the + * platform's default encoding + * + * @param document The input document + * @return The document-declared encoding + */ + public String getEncoding(Document document) { + String encoding = document.getDocumentElement().getAttribute("encoding"); + + if (encoding.length() > 0) { + return encoding; + } + + return null; + } + + /** + * Prepare the document for logicsheet processing and code generation. This + * method sets the base filename, file path and creation date as root element + * attibutes and encodes text nodes as strings. + * + * @param document The input document + * @param filename The input source filename + * @param language The target programming language + * @return The augmented document + */ + protected Document preprocessDocument( + Document document, String filename, ProgrammingLanguage language + ) + { + // Store path and file name + int pos = filename.lastIndexOf(File.separatorChar); + String name = filename.substring(pos + 1); + String path = filename.substring(0, pos).replace(File.separatorChar, '/'); + + Element root = document.getDocumentElement(); + + root.setAttribute("file-name", name); + root.setAttribute("file-path", path); + root.setAttribute("creation-date", String.valueOf(new Date().getTime())); + + this.quoteStrings(document, language); + + return document; + } + + /** + * Encode text nodes as strings according to the target programming languages + * string constant escaping rules. + * + * @param node The node to be escaped + * @param language The target programming language + */ + protected void quoteStrings(Node node, ProgrammingLanguage language) { + switch (node.getNodeType()) { + case Node.PROCESSING_INSTRUCTION_NODE: + ProcessingInstruction pi = (ProcessingInstruction) node; + if (!pi.getTarget().equals("xml-logicsheet")) { + pi.setData(language.quoteString(pi.getData())); + } + break; + case Node.TEXT_NODE: + if (true) break; // the sitemap shouldn't have any text node + Element parent = (Element) node.getParentNode(); + + String tagName = parent.getTagName(); + + if ( + tagName.equals("xsp:expr") || + tagName.equals("xsp:logic") || + tagName.equals("xsp:structure") || + tagName.equals("xsp:include") + ) { + return; + } + + String value = language.quoteString(node.getNodeValue()); + Text textNode = node.getOwnerDocument().createTextNode(value); + + Element textElement = node.getOwnerDocument().createElement("xsp:text"); + + textElement.appendChild(textNode); + parent.replaceChild(textElement, node); + + break; + case Node.ELEMENT_NODE: + ((Element) node).normalize(); + // Fall through + default: + NodeList childList = node.getChildNodes(); + int childCount = childList.getLength(); + + for (int i = 0; i < childCount; i++) { + this.quoteStrings(childList.item(i), language); + } + + break; + } + } + + /** + * Returns a list of logicsheets to be applied to this document for source + * code generation. This method scans the input document for + * <?xml-logicsheet?> processing instructions and top-level + * <xsp:logicsheet> elements. Logicsheet declarations are removed from + * the input document. + * + * @param document The input document + * @return An array of logicsheet names + */ + protected String[] getLogicsheets(Document document) { + Vector removedNodes = new Vector(); + Vector logicsheetList = new Vector(); + Element root = document.getDocumentElement(); + + // Retrieve logicsheets declared by processing-instruction + NodeList nodeList = document.getChildNodes(); + int count = nodeList.getLength(); + for (int i = 0; i < count; i++) { + Node node = nodeList.item(i); + if (node.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE) { + ProcessingInstruction pi = (ProcessingInstruction) node; + + if (pi.getTarget().equals("xml-logicsheet")) { + Hashtable attrs = DOMUtils.getPIPseudoAttributes(pi); + logicsheetList.addElement(attrs.get("href")); + + removedNodes.addElement(pi); + } + } + } + + // Retrieve logicsheets declared by top-level elements + nodeList = root.getElementsByTagName("map:logicsheet"); + count = nodeList.getLength(); + + for (int i = 0; i < count; i++) { + Element logicsheetElement = (Element) nodeList.item(i); + removedNodes.addElement(logicsheetElement); + logicsheetList.addElement(logicsheetElement.getAttribute("location")); + } + + String[] logicsheetLocations = new String[logicsheetList.size()]; + logicsheetList.copyInto(logicsheetLocations); + + + // Remove logicsheet directives + count = removedNodes.size(); + for (int i = 0; i < count; i++) { + Node node = (Node) removedNodes.elementAt(i); + Node parent = node.getParentNode(); + parent.removeChild(node); + } + + return logicsheetLocations; + } + + /** + * Add a dependency on an external file to the document for inclusion in + * generated code. This is used by AbstractServerPagesGenerator + * to populate a list of File's tested for change on each + * invocation; this information, in turn, is used by + * ServerPagesLoaderImpl to assert whether regeneration is + * necessary. XSP uses <xsp:dependency> elements for this purpose + * + * @param PARAM_NAME Param description + * @return the value + * @exception EXCEPTION_NAME If an error occurs + * @see ServerPages AbstractServerPagesGenerator + * and ServerPagesLoaderImpl + */ +/** Sitemaps don't (yet) have dependencies */ + protected void addDependency(Document document, String location) { + Element root = document.getDocumentElement(); + Element dependency = document.createElement("xsp:dependency"); + dependency.appendChild(document.createTextNode(location)); + root.appendChild(dependency); + } +/* */ + + /** + * Scan top-level document elements for non-xsp tag names returning the first + * (and hopefully only) user-defined element + * + * @param document The input document + * @return The first non-xsp element + */ +/** Sitemaps don't have a user root + protected Element getUserRoot(Document document) { + Element root = document.getDocumentElement(); + NodeList elements = root.getElementsByTagName("*"); + int elementCount = elements.getLength(); + for (int i = 0; i < elementCount; i++) { + Element userRoot = (Element) elements.item(i); + if (!userRoot.getTagName().startsWith("map:")) { + return userRoot; + } + } + + return null; + } +*/ +} No revision No revision 1.1.2.8 +488 -480 xml-cocoon/src/org/apache/cocoon/components/language/markup/sitemap/java/Attic/sitemap.xsl Index: sitemap.xsl =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/markup/sitemap/java/Attic/sitemap.xsl,v retrieving revision 1.1.2.7 retrieving revision 1.1.2.8 diff -u -r1.1.2.7 -r1.1.2.8 --- sitemap.xsl 2000/07/12 22:15:07 1.1.2.7 +++ sitemap.xsl 2000/07/17 21:06:11 1.1.2.8 @@ -1,368 +1,376 @@ - - - - - - - - map - - - - - - - - - - - package ; - - import java.util.Map; - import java.util.Stack; - import java.util.Vector; - - import org.apache.avalon.Configuration; - import org.apache.avalon.ConfigurationException; - import org.apache.avalon.SAXConfigurationBuilder; - import org.apache.avalon.utils.Parameters; - - import org.apache.cocoon.Request; - import org.apache.cocoon.Response; - import org.apache.cocoon.selection.Selector; - import org.apache.cocoon.transformation.Transformer; - import org.apache.cocoon.generation.Generator; - import org.apache.cocoon.matching.Matcher; - import org.apache.cocoon.serialization.Serializer; - import org.apache.cocoon.sitemap.AbstractSitemapProcessor; - import org.apache.cocoon.sitemap.ResourcePipeline; - - import org.xml.sax.helpers.AttributesImpl; - -/** - * - * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a> - * @version CVS $Revision: 1.1.2.7 $ $Date: 2000/07/12 22:15:07 $ - */ -public class extends AbstractSitemapProcessor { - - SAXConfigurationBuilder confBuilder = new SAXConfigurationBuilder (); - Parameters emptyParam = new Parameters(); - - - /** The generators */ - - private Generator generator_ = null; - - - /** The transformers */ - - private Transformer transformer_ = null; - - - /** The serializers */ - - private Serializer serializer_ = null; - - - /** The matchers */ - - private Matcher matcher_ = null; - - - /** The selectors */ - - private Selector selector_ = null; - - - /** The sub sitemaps */ - - SitemapProcessor sitemap_ = null; - - - /** The generated matchers */ - - - - true - - - - private Map _matcher_ (Request request) { - - } - - - - /** The generated selectors */ - - - - true - - - - private boolean _selector_ (Request request) { - - } - - - - /** - * Pass a <code>Configuration</code> instance to this - * <code>Configurable</code> class. - */ - public void setConfiguration(Configuration xconf) { - throws ConfigurationException { + + + + + + + + map + + + + + + + + + + + package ; + + import java.io.OutputStream; + + import java.util.Map; + import java.util.Stack; + import java.util.Vector; + + import org.apache.avalon.Configuration; + import org.apache.avalon.ConfigurationException; + import org.apache.avalon.SAXConfigurationBuilder; + import org.apache.avalon.utils.Parameters; + + import org.apache.cocoon.Request; + import org.apache.cocoon.Response; + import org.apache.cocoon.selection.Selector; + import org.apache.cocoon.transformation.Transformer; + import org.apache.cocoon.generation.Generator; + import org.apache.cocoon.matching.Matcher; + import org.apache.cocoon.serialization.Serializer; + import org.apache.cocoon.sitemap.AbstractSitemapProcessor; + import org.apache.cocoon.sitemap. SitemapProcessor; + import org.apache.cocoon.sitemap.ResourcePipeline; + + import org.xml.sax.helpers.AttributesImpl; + +/** + * + * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a> + * @version CVS $Revision: 1.1.2.8 $ $Date: 2000/07/17 21:06:11 $ + */ +public class extends AbstractSitemapProcessor { + + SAXConfigurationBuilder confBuilder = new SAXConfigurationBuilder (); + Parameters emptyParam = new Parameters(); + + private Generator generator_error_handler = null; + + + /** The generators */ + + private Generator generator_ = null; + + + /** The transformers */ + + private Transformer transformer_ = null; + + + /** The serializers */ + + private Serializer serializer_ = null; + + + /** The matchers */ + + private Matcher matcher_ = null; + + + /** The selectors */ + + private Selector selector_ = null; + + + /** The sub sitemaps */ + + SitemapProcessor sitemap_ = null; + + + /** The generated matchers */ + + + + true + + + + + private Map _matcher_ (Request request) { + + } + + + + /** The generated selectors */ + + + + true + + + + + private boolean _selector_ (Request request) { + + } + + + + /** + * Pass a <code>Configuration</code> instance to this + * <code>Configurable</code> class. + */ + public void setConfiguration(Configuration xconf) + throws ConfigurationException { AttributeImpl attr = new AttributeImpl(); + + + /* Configure generators */ + + generator + Generator + + + + /* Configure transformers */ + + transformer + Transformer + + + + /* Configure serializers */ + + serializer + Serializer + + + + /* Configure matchers */ + + matcher + Matcher + + + + /* Configure selectors */ + + selector + Selector + + + + /* Configure mounted sitemaps */ + SitemapManager sm = SitemapManager.getInstance(); + sm.beginRegistration (this); + + sitemap_ = sm.registerSitemap (this, ""); + sitemap_.setConfiguration (null); + + sm.endRegistration (this); + } + + + private boolean resource_ (ResourcePipeline pipeline, + Stack mapStack, Request req, Response res, OutputStream out) + throws SAXException, IOException, ProcessingException { + Map map = null; + Parameters param = null; + + } + + + /** + * Process the given Request producing the output to the + * specified Response and OutputStream. + */ + public boolean process(Request request, Response response, OutputStream out) + throws SAXException, IOException, ProcessingException { + ResourcePipeline pipeline = new ResourcePipeline (); + Stack mapStack = new Stack(); + Map map = null; + Parameters param = null; + + try { + + } catch (Exception e) { + + + throw e; + + + pipeline.setGenerator (generator_error_handler, e.getMessage(), emptyParam); + + return pipeline.process (request, response, out); + + + } + + } +} + + - - /* Configure generators */ - - generator - Generator - - - - /* Configure transformers */ - - transformer - Transformer - - - - /* Configure serializers */ - - serializer - Serializer - - - - /* Configure matchers */ - - matcher - Matcher - - - - /* Configure selectors */ - - selector - Selector - - - - /* Configure mounted sitemaps */ - SitemapManager sm = SitemapManager.getInstance(); - sm.beginRegistration (this); - - sitemap_ = sm.registerSitemap (this, ""); - sitemap_.setConfiguration (null); - - sm.endRegistration (this); - } - - - private boolean resource_ (ResourcePipeline pipeline, - Stack mapStack, Request req, Response res, OutputStream out) - throws SAXException, IOException, ProcessingException { - Map map = null; - Parameters param = null; - - } - - - /** - * Process the given Request producing the output to the - * specified Response and OutputStream. - */ - public boolean process(Request req, Response res, OutputStream out) - throws SAXException, IOException, ProcessingException { - ResourcePipeline pipeline = new ResourcePipeline (); - Stack mapStack = new Stack(); - Map map = null; - Parameters param = null; - - try { - - } catch (Exception e) { - - - throw e; - - - pipeline.setGenerator (generator_error_hanler, e.getMessage(), emptyParam); - - return pipeline.process (request, response, out); - - - } - - } -} - - - - - - - type - - - - - - pattern - true - - - if ((map = matcher_.match ("", request)) != null) { - mapStack.push (map); - - } - - - - - - type - - - - - - - test - true - - - if (selector_.select ("", request)) { - - } - - - - else { - - } - - - - - - - setGenerator - generator - - - - - - - addTransformer - transformer - - - - - - - setSerializer - serializer - - return pipeline.process (request, response, out); - - - - - - - - - - - - return sitemap_.process(request, response, out); - - - - return read (request, response, out, - "", ""); - - - - - - return resource_(pipeline, mapStack, request, response, out); - - - // request.setUri (""); - // this.process(request, response, out); - - - - Missing attribute uri= or resource= to element redirect-to - - - - - - - param.setParameter ("", ""); - - - - - - - - - - - - - - + + + + type + + + + + + pattern + true + + + if ((map = matcher_.match ("", request)) != null) { + mapStack.push (map); + + } + + + + + + type + + + + + + + test + true + + + if (selector_.select ("", request)) { + + } + + + + else { + + } + + + + + + + setGenerator + generator + + + + + + + addTransformer + transformer + + + + + + + setSerializer + serializer + + return pipeline.process (request, response, out); + + + + + + + + + + + + return sitemap_.process(request, response, out); + + + + return read (request, response, out, + "", ""); + + + + + + return resource_(pipeline, mapStack, request, response, out); + + + // request.setUri (""); + // this.process(request, response, out); + + + + Missing attribute uri= or resource= to element redirect-to + + + + + + + param.setParameter ("", ""); + + + + + + + + + + + + + + - confBuilder.startDocument (); - - - - - - - - - confBuilder.endDocument (); - _ = - ()load_component ("", confBuilder.getConfiguration()); - - - - - - - - - - - - - - - - - - + confBuilder.startDocument (); + + + + + + + + + confBuilder.endDocument (); + _ = + ()load_component ("", + confBuilder.getConfiguration()); + + + + + + + + + + + + + + + + + + confBuilder.startPrefixMapping("",""); @@ -377,125 +385,125 @@ confBuilder.characters("".toCharArray(), 0, ); - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + confBuilder.endElement("", "", ""); confBuilder.endPrefixMapping("",""); - - - - - - - - - - type - - - - - - src - null - - - - param = new Parameters (); - - - - - param - - - emptyParam - - - - - - - pipeline. (_, - null, ); - - - pipeline. (_, - "", ); - - - - - - - - - - false - - - - - - - - - - - - - - - - - - - [Logicsheet processor] -Parameter '' missing in dynamic tag <> - - - - "" - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + type + + + + + + src + null + + + + param = new Parameters (); + + + + + param + + + emptyParam + + + + + + + pipeline. (_, + null, ); + + + pipeline. (_, + "", ); + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + [Logicsheet processor] +Parameter '' missing in dynamic tag <> + + + + "" + + + + + + + + + + + + + + + + + + + + + + + + + + + No revision No revision 1.1.2.3 +23 -3 xml-cocoon/src/org/apache/cocoon/matching/Attic/BrowserMatcherFactory.java Index: BrowserMatcherFactory.java =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/matching/Attic/BrowserMatcherFactory.java,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -r1.1.2.2 -r1.1.2.3 --- BrowserMatcherFactory.java 2000/07/12 22:15:11 1.1.2.2 +++ BrowserMatcherFactory.java 2000/07/17 21:06:11 1.1.2.3 @@ -6,17 +6,37 @@ * the LICENSE file. * *****************************************************************************/ package org.apache.cocoon.matching; + +import java.util.Stack; + +import org.w3c.dom.DocumentFragment; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; + +import org.apache.xerces.dom. /** * This class generates source code which matches a specific browser pattern * for request URIs * * @author Giacomo Pati - * @version CVS $Revision: 1.1.2.2 $ $Date: 2000/07/12 22:15:11 $ + * @version CVS $Revision: 1.1.2.3 $ $Date: 2000/07/17 21:06:11 $ */ public class BrowserMatcherFactory implements MatcherFactory { - public String generate (String test_expression) { - return "return null;"; + public String generate (String test_expression, DocumentFragment conf) { + StringBuffer sb = new StringBuffer(); + sb.append("/*\n"); + + Stack st = new Stack(); + Node node = conf.getFirstChild(); + for (int i = 0; i < nl.getLength(); i++) { + Node node = nl.item(i); + sb.append("name="+node.getNodeName() + +" type="+node.getNodeType() + +" value="+node.getNodeValue()+"\n"); + } + sb.append("*/return null;"); + return (sb.toString()); } } 1.1.2.2 +23 -23 xml-cocoon/src/org/apache/cocoon/matching/Attic/Matcher.java Index: Matcher.java =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/matching/Attic/Matcher.java,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- Matcher.java 2000/07/11 23:46:42 1.1.2.1 +++ Matcher.java 2000/07/17 21:06:11 1.1.2.2 @@ -1,23 +1,23 @@ -/***************************************************************************** - * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * - *****************************************************************************/ -package org.apache.cocoon.matching; - -import java.util.Map; - -import org.apache.cocoon.sitemap.SitemapComponent; -import org.apache.cocoon.Request; - -/** - * - * @author Giacomo Pati - * @version CVS $Revision: 1.1.2.1 $ $Date: 2000/07/11 23:46:42 $ - */ -public interface Matcher extends SitemapComponent { +/***************************************************************************** + * Copyright (C) The Apache Software Foundation. All rights reserved. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * + *****************************************************************************/ +package org.apache.cocoon.matching; + +import java.util.Map; + +import org.apache.cocoon.sitemap.SitemapComponent; +import org.apache.cocoon.Request; + +/** + * + * @author Giacomo Pati + * @version CVS $Revision: 1.1.2.2 $ $Date: 2000/07/17 21:06:11 $ + */ +public interface Matcher extends SitemapComponent { /** * Matches the pattern against some Request values * and returns a Map object with replacements @@ -32,6 +32,6 @@ * contained in the pattern. * If the return value is null there was no match. */ - public Map match (String pattern, Request request); -} - + public Map match (String pattern, Request request); +} + 1.1.2.2 +4 -2 xml-cocoon/src/org/apache/cocoon/matching/Attic/MatcherFactory.java Index: MatcherFactory.java =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/matching/Attic/MatcherFactory.java,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- MatcherFactory.java 2000/07/11 23:46:43 1.1.2.1 +++ MatcherFactory.java 2000/07/17 21:06:11 1.1.2.2 @@ -6,6 +6,8 @@ * the LICENSE file. * *****************************************************************************/ package org.apache.cocoon.matching; + +import org.w3c.dom.DocumentFragment; /** * Interface a class has to implement that produces java source code @@ -16,9 +18,9 @@ * sitemap code generation. * * @author Giacomo Pati - * @version CVS $Revision: 1.1.2.1 $ $Date: 2000/07/11 23:46:43 $ + * @version CVS $Revision: 1.1.2.2 $ $Date: 2000/07/17 21:06:11 $ */ public interface MatcherFactory { - public String generate (String pattern) throws Exception; + public String generate (String pattern, DocumentFragment conf) throws Exception; } 1.1.2.2 +6 -4 xml-cocoon/src/org/apache/cocoon/matching/Attic/WildcardURIMatcherFactory.java Index: WildcardURIMatcherFactory.java =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/matching/Attic/WildcardURIMatcherFactory.java,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- WildcardURIMatcherFactory.java 2000/07/11 23:46:44 1.1.2.1 +++ WildcardURIMatcherFactory.java 2000/07/17 21:06:12 1.1.2.2 @@ -9,13 +9,15 @@ import org.apache.cocoon.sitemap.patterns.PatternTranslator; import org.apache.cocoon.sitemap.patterns.PatternException; + +import org.w3c.dom.DocumentFragment; /** * This class generates source code which represents a specific pattern matcher * for request URIs * * @author Giacomo Pati - * @version CVS $Revision: 1.1.2.1 $ $Date: 2000/07/11 23:46:44 $ + * @version CVS $Revision: 1.1.2.2 $ $Date: 2000/07/17 21:06:12 $ */ public class WildcardURIMatcherFactory /*extends PatternTranslator*/ implements MatcherFactory { @@ -33,7 +35,7 @@ /** * Generates the matcher method source code */ - public String generate (String pattern) + public String generate (String pattern, DocumentFragment conf) throws PatternException { StringBuffer result = new StringBuffer(); this.setPattern (pattern); @@ -51,7 +53,7 @@ result.append (sourcePattern[j]); result.append ("};"); result.append ("if (org.apache.cocoon.matching.helpers.WildcardURIMatcher.match (stack, request.getUri(), expr))"); - result.append ("return stack;"); + result.append ("return (Map) stack;"); result.append ("else return null;"); return result.toString(); } @@ -140,7 +142,7 @@ if (argv.length<1) return; System.out.println("Matching Expr. \""+argv[0]+"\""); WildcardURIMatcherFactory wm = new WildcardURIMatcherFactory(); - System.out.println(wm.generate (argv[0])); + System.out.println(wm.generate (argv[0], null)); } catch (Exception e) { System.out.println(e.getClass().getName()); System.out.println(e.getMessage()); No revision No revision 1.1.2.2 +4 -2 xml-cocoon/src/org/apache/cocoon/selection/Attic/BrowserSelectorFactory.java Index: BrowserSelectorFactory.java =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/selection/Attic/BrowserSelectorFactory.java,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- BrowserSelectorFactory.java 2000/07/12 22:15:12 1.1.2.1 +++ BrowserSelectorFactory.java 2000/07/17 21:06:12 1.1.2.2 @@ -6,17 +6,19 @@ * the LICENSE file. * *****************************************************************************/ package org.apache.cocoon.selection; + +import org.w3c.dom.DocumentFragment; /** * This class generates source code which tests a specific browser pattern * agains the requesting user-agent * * @author Giacomo Pati - * @version CVS $Revision: 1.1.2.1 $ $Date: 2000/07/12 22:15:12 $ + * @version CVS $Revision: 1.1.2.2 $ $Date: 2000/07/17 21:06:12 $ */ public class BrowserSelectorFactory implements SelectorFactory { - public String generate (String test_expression) { + public String generate (String test_expression, DocumentFragment conf) { return "return true;"; } } 1.1.2.2 +22 -22 xml-cocoon/src/org/apache/cocoon/selection/Attic/Selector.java Index: Selector.java =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/selection/Attic/Selector.java,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- Selector.java 2000/07/11 23:46:47 1.1.2.1 +++ Selector.java 2000/07/17 21:06:12 1.1.2.2 @@ -1,21 +1,21 @@ -/***************************************************************************** - * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * - *****************************************************************************/ -package org.apache.cocoon.selection; - -import org.apache.cocoon.sitemap.SitemapComponent; -import org.apache.cocoon.Request; - -/** - * - * @author Giacomo Pati - * @version CVS $Revision: 1.1.2.1 $ $Date: 2000/07/11 23:46:47 $ - */ -public interface Selector extends SitemapComponent { +/***************************************************************************** + * Copyright (C) The Apache Software Foundation. All rights reserved. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * + *****************************************************************************/ +package org.apache.cocoon.selection; + +import org.apache.cocoon.sitemap.SitemapComponent; +import org.apache.cocoon.Request; + +/** + * + * @author Giacomo Pati + * @version CVS $Revision: 1.1.2.2 $ $Date: 2000/07/17 21:06:12 $ + */ +public interface Selector extends SitemapComponent { /** * Selectors test pattern against some Request values * and signals success with the returned boolean value @@ -24,7 +24,7 @@ * to select values to test the expression. * @return boolean Signals successfull test. */ - public boolean select (String expression, Request request); -} - - + public boolean select (String expression, Request request); +} + + 1.1.2.2 +4 -2 xml-cocoon/src/org/apache/cocoon/selection/Attic/SelectorFactory.java Index: SelectorFactory.java =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/selection/Attic/SelectorFactory.java,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- SelectorFactory.java 2000/07/12 22:15:13 1.1.2.1 +++ SelectorFactory.java 2000/07/17 21:06:13 1.1.2.2 @@ -6,6 +6,8 @@ * the LICENSE file. * *****************************************************************************/ package org.apache.cocoon.selection; + +import org.w3c.dom.DocumentFragment; /** * Interface a class has to implement that produces java source code @@ -16,9 +18,9 @@ * sitemap code generation. * * @author Giacomo Pati - * @version CVS $Revision: 1.1.2.1 $ $Date: 2000/07/12 22:15:13 $ + * @version CVS $Revision: 1.1.2.2 $ $Date: 2000/07/17 21:06:13 $ */ public interface SelectorFactory { - public String generate (String test) throws Exception; + public String generate (String test, DocumentFragment conf) throws Exception; } No revision No revision 1.1.2.2 +57 -57 xml-cocoon/src/org/apache/cocoon/serialization/Attic/FO2PDFSerializer.java Index: FO2PDFSerializer.java =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/serialization/Attic/FO2PDFSerializer.java,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- FO2PDFSerializer.java 2000/07/11 23:46:49 1.1.2.1 +++ FO2PDFSerializer.java 2000/07/17 21:06:13 1.1.2.2 @@ -1,66 +1,66 @@ -/***************************************************************************** - * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * - *****************************************************************************/ -package org.apache.cocoon.serialization; - -import java.io.IOException; -import java.io.OutputStream; -import java.io.PrintWriter; - -import org.apache.avalon.utils.Parameters; -import org.apache.cocoon.Request; -import org.apache.cocoon.Response; +/***************************************************************************** + * Copyright (C) The Apache Software Foundation. All rights reserved. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * + *****************************************************************************/ +package org.apache.cocoon.serialization; + +import java.io.IOException; +import java.io.OutputStream; +import java.io.PrintWriter; + +import org.apache.avalon.utils.Parameters; +import org.apache.cocoon.Request; +import org.apache.cocoon.Response; import org.apache.cocoon.xml.util.DocumentHandlerWrapper; - -import org.apache.fop.apps.Driver; -import org.apache.fop.apps.FOPException; -import org.apache.fop.apps.Version; - -//import org.xml.sax.Attributes; -//import org.xml.sax.AttributeList; -import org.xml.sax.DocumentHandler; -//import org.xml.sax.helpers.AttributeListImpl; -//import org.xml.sax.Locator; -import org.xml.sax.SAXException; - -/** - * - * @author Giacomo Pati - * (PWR Organisation & Entwicklung) - * @version CVS $Revision: 1.1.2.1 $ $Date: 2000/07/11 23:46:49 $ + +import org.apache.fop.apps.Driver; +import org.apache.fop.apps.FOPException; +import org.apache.fop.apps.Version; + +//import org.xml.sax.Attributes; +//import org.xml.sax.AttributeList; +import org.xml.sax.DocumentHandler; +//import org.xml.sax.helpers.AttributeListImpl; +//import org.xml.sax.Locator; +import org.xml.sax.SAXException; + +/** * - */ + * @author Giacomo Pati + * (PWR Organisation & Entwicklung) + * @version CVS $Revision: 1.1.2.2 $ $Date: 2000/07/17 21:06:13 $ + * + */ public class FO2PDFSerializer extends DocumentHandlerWrapper - implements Serializer { + implements Serializer { /** * The FOP driver - */ - private Driver driver = null; - - /** - * Set the Request, Response and sitemap - * Parameters used to process the request. - */ - public void setup(Request req, Response res, String src, Parameters par) { - driver = new Driver(); - driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer", Version.getVersion()); - driver.addElementMapping("org.apache.fop.fo.StandardElementMapping"); - driver.addElementMapping("org.apache.fop.svg.SVGElementMapping"); + */ + private Driver driver = null; + + /** + * Set the Request, Response and sitemap + * Parameters used to process the request. + */ + public void setup(Request req, Response res, String src, Parameters par) { + driver = new Driver(); + driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer", Version.getVersion()); + driver.addElementMapping("org.apache.fop.fo.StandardElementMapping"); + driver.addElementMapping("org.apache.fop.svg.SVGElementMapping"); res.setContentType(par.getParameter("contentType","application/pdf")); - this.setDocumentHandler (driver.getDocumentHandler()); - } - - /** - * Set the OutputStream where the XML should be serialized. - */ - public void setOutputStream(OutputStream out) { - driver.setWriter(new PrintWriter(out)); - } + this.setDocumentHandler (driver.getDocumentHandler()); + } + + /** + * Set the OutputStream where the XML should be serialized. + */ + public void setOutputStream(OutputStream out) { + driver.setWriter(new PrintWriter(out)); + } /** * Receive notification of the end of a document. @@ -77,4 +77,4 @@ throw new SAXException (e); } } -} +} No revision No revision 1.1.2.4 +39 -32 xml-cocoon/src/org/apache/cocoon/sitemap/Attic/AbstractSitemapProcessor.java Index: AbstractSitemapProcessor.java =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/sitemap/Attic/AbstractSitemapProcessor.java,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -r1.1.2.3 -r1.1.2.4 --- AbstractSitemapProcessor.java 2000/07/11 03:10:03 1.1.2.3 +++ AbstractSitemapProcessor.java 2000/07/17 21:06:14 1.1.2.4 @@ -26,7 +26,7 @@ * Base class for XSP-generated SitemapProcessor classes * * @author Giacomo Pati - * @version CVS $Revision: 1.1.2.3 $ $Date: 2000/07/11 03:10:03 $ + * @version CVS $Revision: 1.1.2.4 $ $Date: 2000/07/17 21:06:14 $ */ public abstract class AbstractSitemapProcessor implements SitemapProcessor { @@ -47,42 +47,46 @@ this.manager=manager; } - /** - * Determines whether this generator's source files have changed - * - * @return Whether any of the files this generator depends on has changed - * since it was created - */ - public final boolean modifiedSince(long date) { - if (dateCreated < date) { - return true; + /** + * Determines whether this generator's source files have changed + * + * @return Whether any of the files this generator depends on has changed + * since it was created + */ + public final boolean modifiedSince(long date) { + if (dateCreated < date) { + return true; + } + + for (int i = 0; i < dependencies.length; i++) { + if (dateCreated < dependencies[i].lastModified()) { + return true; + } + } + + return false; } - for (int i = 0; i < dependencies.length; i++) { - if (dateCreated < dependencies[i].lastModified()) { + /** + * Determines whether generated content has changed since + * last invocation. Users may override this method to take + * advantage of SAX event cacheing + * + * @param request The request whose data must be inspected to assert whether + * dynamically generated content has changed + * @return Whether content has changes for this request's data + */ + public boolean hasContentChanged(Request request) { return true; - } } - return false; - } - - /** - * Determines whether generated content has changed since - * last invocation. Users may override this method to take - * advantage of SAX event cacheing - * - * @param request The request whose data must be inspected to assert whether - * dynamically generated content has changed - * @return Whether content has changes for this request's data - */ - public boolean hasContentChanged(Request request) { - return true; - } /** * Loads a class specified in a sitemap component definition */ - protected Object load_component (String ClassURL, Configuration conf) { return (""); } + protected Object load_component (String ClassURL, Configuration conf) { + return (""); + } + /** * Resolve a link against a source into the target URI space. */ @@ -92,8 +96,11 @@ } /** - * Constructs a ResourcePipeline for the Request. + * Constructs a resource to the supplied OutputStream + * for the Request and Response arguments. * This method is supplied by the generated SitemapProcessor . */ - protected abstract ResourcePipeline constructPipeline (Request request, Response resposne); - /** Following methods are for testing purposes only and should later be deleted */ protected boolean uri_wildcard_matcher (String pattern) { return (true); } protected boolean uri_regexp_matcher (String pattern) { return (true); } protected boolean browser_matcher (String pattern) { return (true); } } \ No newline at end of file +/* + public abstract boolean process (Request request, Response resposne, OutputStream out); +*/ +} \ No newline at end of file 1.1.2.5 +2 -2 xml-cocoon/src/org/apache/cocoon/sitemap/Attic/ResourcePipeline.java Index: ResourcePipeline.java =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/sitemap/Attic/ResourcePipeline.java,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -u -r1.1.2.4 -r1.1.2.5 --- ResourcePipeline.java 2000/07/11 23:46:54 1.1.2.4 +++ ResourcePipeline.java 2000/07/17 21:06:14 1.1.2.5 @@ -26,7 +26,7 @@ /** * * @author Giacomo Pati - * @version CVS $Revision: 1.1.2.4 $ $Date: 2000/07/11 23:46:54 $ + * @version CVS $Revision: 1.1.2.5 $ $Date: 2000/07/17 21:06:14 $ */ public class ResourcePipeline { private Generator generator = null; @@ -60,7 +60,7 @@ this.transformerParams.add (param); } - public boolean startPipeline (Request req, Response res, OutputStream out) + public boolean process (Request req, Response res, OutputStream out) throws ProcessingException, IOException, SAXException { if (generator == null) { throw new ProcessingException ("Generator not specified"); 1.1.2.3 +5 -3 xml-cocoon/src/org/apache/cocoon/sitemap/Attic/XSLTMatcherFactoryLoader.java Index: XSLTMatcherFactoryLoader.java =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/sitemap/Attic/XSLTMatcherFactoryLoader.java,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -r1.1.2.2 -r1.1.2.3 --- XSLTMatcherFactoryLoader.java 2000/07/12 22:15:17 1.1.2.2 +++ XSLTMatcherFactoryLoader.java 2000/07/17 21:06:14 1.1.2.3 @@ -8,6 +8,8 @@ package org.apache.cocoon.sitemap; import org.apache.cocoon.matching.MatcherFactory; + +import org.w3c.dom.DocumentFragment; /** * This class is used as a XSLT extension class. It is used by the sitemap @@ -15,15 +17,15 @@ * generated source code. * * @author Giacomo Pati - * @version CVS $Revision: 1.1.2.2 $ $Date: 2000/07/12 22:15:17 $ + * @version CVS $Revision: 1.1.2.3 $ $Date: 2000/07/17 21:06:14 $ */ public class XSLTMatcherFactoryLoader { - public String getSource (String matcherFactoryClassname, String pattern) + public String getSource (String matcherFactoryClassname, String pattern, DocumentFragment conf) throws ClassNotFoundException, InstantiationException, IllegalAccessException, Exception { Class cl = this.getClass().getClassLoader().loadClass(matcherFactoryClassname); MatcherFactory factory = (MatcherFactory) cl.newInstance(); - return factory.generate (pattern); + return factory.generate (pattern, conf); } } 1.1.2.2 +5 -3 xml-cocoon/src/org/apache/cocoon/sitemap/Attic/XSLTSelectorFactoryLoader.java Index: XSLTSelectorFactoryLoader.java =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/sitemap/Attic/XSLTSelectorFactoryLoader.java,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- XSLTSelectorFactoryLoader.java 2000/07/12 22:15:18 1.1.2.1 +++ XSLTSelectorFactoryLoader.java 2000/07/17 21:06:14 1.1.2.2 @@ -8,6 +8,8 @@ package org.apache.cocoon.sitemap; import org.apache.cocoon.selection.SelectorFactory; + +import org.w3c.dom.DocumentFragment; /** * This class is used as a XSLT extension class. It is used by the sitemap @@ -15,15 +17,15 @@ * generated source code. * * @author Giacomo Pati - * @version CVS $Revision: 1.1.2.1 $ $Date: 2000/07/12 22:15:18 $ + * @version CVS $Revision: 1.1.2.2 $ $Date: 2000/07/17 21:06:14 $ */ public class XSLTSelectorFactoryLoader { - public String getSource (String selectorFactoryClassname, String test) + public String getSource (String selectorFactoryClassname, String test, DocumentFragment conf) throws ClassNotFoundException, InstantiationException, IllegalAccessException, Exception { Class cl = this.getClass().getClassLoader().loadClass(selectorFactoryClassname); SelectorFactory factory = (SelectorFactory) cl.newInstance(); - return factory.generate (test); + return factory.generate (test, conf); } } No revision No revision 1.1.2.10 +22 -18 xml-cocoon/xdocs/drafts/Attic/sitemap-working-draft.xmap Index: sitemap-working-draft.xmap =================================================================== RCS file: /home/cvs/xml-cocoon/xdocs/drafts/Attic/sitemap-working-draft.xmap,v retrieving revision 1.1.2.9 retrieving revision 1.1.2.10 diff -u -r1.1.2.9 -r1.1.2.10 --- sitemap-working-draft.xmap 2000/07/12 22:15:26 1.1.2.9 +++ sitemap-working-draft.xmap 2000/07/17 21:06:15 1.1.2.10 @@ -226,7 +226,7 @@ --> - ... + ... @@ -234,7 +234,11 @@ - ... + baz + + red + white + @@ -359,7 +363,7 @@ match some of their parameters --> - +