[z3-checkins] r33075 - in z3/deliverance/branches/packaged/deliverance: . test-data test-data/nabuur test-data/nycsr test-data/static
ltucker at codespeak.net
ltucker at codespeak.net
Mon Oct 9 22:04:02 CEST 2006
Author: ltucker
Date: Mon Oct 9 22:03:44 2006
New Revision: 33075
Added:
z3/deliverance/branches/packaged/deliverance/handtransform.py
z3/deliverance/branches/packaged/deliverance/htmlserialize.py
z3/deliverance/branches/packaged/deliverance/interpreter.py
z3/deliverance/branches/packaged/deliverance/test-data/
z3/deliverance/branches/packaged/deliverance/test-data/nabuur/
z3/deliverance/branches/packaged/deliverance/test-data/nabuur/nabuur.html
z3/deliverance/branches/packaged/deliverance/test-data/nabuur/nabuur.theme
z3/deliverance/branches/packaged/deliverance/test-data/nabuur/rules.xml
z3/deliverance/branches/packaged/deliverance/test-data/nabuur/standardrules.xml
z3/deliverance/branches/packaged/deliverance/test-data/nycsr/
z3/deliverance/branches/packaged/deliverance/test-data/nycsr/nycsr.theme
z3/deliverance/branches/packaged/deliverance/test-data/nycsr/nycsr.xml
z3/deliverance/branches/packaged/deliverance/test-data/nycsr/nycsr_expected.html
z3/deliverance/branches/packaged/deliverance/test-data/nycsr/openplans.html
z3/deliverance/branches/packaged/deliverance/test-data/nycsr/standardrules.xml
z3/deliverance/branches/packaged/deliverance/test-data/static/
z3/deliverance/branches/packaged/deliverance/test-data/static/example.html
z3/deliverance/branches/packaged/deliverance/test-data/static/example_expected.html
z3/deliverance/branches/packaged/deliverance/test-data/static/rules.xml
z3/deliverance/branches/packaged/deliverance/test-data/static/standardrules.xml
z3/deliverance/branches/packaged/deliverance/test-data/static/standardrules2.xml
z3/deliverance/branches/packaged/deliverance/test-data/static/text-rules.xml
z3/deliverance/branches/packaged/deliverance/test-data/static/texttest_expected.html
z3/deliverance/branches/packaged/deliverance/test-data/static/theme.html
z3/deliverance/branches/packaged/deliverance/test-data/static/xinclude_expected.html
z3/deliverance/branches/packaged/deliverance/test-data/static/xinclude_rules.xml
z3/deliverance/branches/packaged/deliverance/test-data/static/xinclude_theme.html
z3/deliverance/branches/packaged/deliverance/test-data/test_append.xml
z3/deliverance/branches/packaged/deliverance/test-data/test_appendorreplace.xml
z3/deliverance/branches/packaged/deliverance/test-data/test_baserules.xml
z3/deliverance/branches/packaged/deliverance/test-data/test_comments.xml
z3/deliverance/branches/packaged/deliverance/test-data/test_copy.xml
z3/deliverance/branches/packaged/deliverance/test-data/test_prepend.xml
z3/deliverance/branches/packaged/deliverance/test-data/test_replace.xml
z3/deliverance/branches/packaged/deliverance/test-data/test_submatch.xml
z3/deliverance/branches/packaged/deliverance/test-data/test_url.xml
z3/deliverance/branches/packaged/deliverance/test_wsgi.py
z3/deliverance/branches/packaged/deliverance/tests.py
z3/deliverance/branches/packaged/deliverance/utils.py
z3/deliverance/branches/packaged/deliverance/xinclude.py
z3/deliverance/branches/packaged/deliverance/xslt.py
Removed:
z3/deliverance/branches/packaged/deliverance/ThemedHTTPServer.py
z3/deliverance/branches/packaged/deliverance/main.py
z3/deliverance/branches/packaged/deliverance/mpfilter.py
z3/deliverance/branches/packaged/deliverance/renderer.xsl
z3/deliverance/branches/packaged/deliverance/themecompiler.xsl
Modified:
z3/deliverance/branches/packaged/deliverance/wsgifilter.py
Log:
parallel python and xslt renderers, tests, wsgi filter
Deleted: /z3/deliverance/branches/packaged/deliverance/ThemedHTTPServer.py
==============================================================================
--- /z3/deliverance/branches/packaged/deliverance/ThemedHTTPServer.py Mon Oct 9 22:03:44 2006
+++ (empty file)
@@ -1,92 +0,0 @@
-"""Simple HTTP Server.
-
-This module builds on BaseHTTPServer by implementing the standard GET
-and HEAD requests in a fairly straightforward manner.
-
-"""
-
-
-__version__ = "0.6"
-
-__all__ = ["ThemedHTTPRequestHandler"]
-
-import os
-import mimetypes
-import BaseHTTPServer
-import SimpleHTTPServer
-from StringIO import StringIO
-
-from deliverance import AppMap
-appmap = AppMap()
-
-
-class ThemedHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
-
- def send_head(self):
- """Common code for GET and HEAD commands.
-
- This sends the response code and MIME headers.
-
- Return value is either a file object (which has to be copied
- to the outputfile by the caller unless the command was HEAD,
- and must be closed by the caller under all circumstances), or
- None, in which case the caller has nothing further to do.
-
- """
- path = self.translate_path(self.path)
- f = None
- if os.path.isdir(path):
- for index in "index.html", "index.htm":
- index = os.path.join(path, index)
- if os.path.exists(index):
- path = index
- break
- else:
- return self.list_directory(path)
- ctype = self.guess_type(path)
- try:
- # Always read in binary mode. Opening files in text mode may cause
- # newline translations, making the actual size of the content
- # transmitted *less* than the content-length!
-
- # This is where we apply theming
-
- # First check to see if there is a query string. If so, presume that
- # to mean they want the source version.
- qs = len(self.path.split("?"))
- if ctype == "text/html" and qs == 99:
- print "Applying theme to", path
- xmlstring = open(path, "r").read()
- response = appmap.publish(xmlstring)
- f = StringIO(response)
- responsesize = str(len(xmlstring))
- else:
- f = open(path, 'rb')
- responsesize = str(os.fstat(f.fileno())[6])
- except IOError:
- self.send_error(404, "File not found")
- return None
- self.send_response(200)
- self.send_header("Content-type", ctype)
- self.send_header("Content-Length", responsesize)
- self.end_headers()
- return f
-
- extensions_map = mimetypes.types_map.copy()
- extensions_map.update({
- '': 'application/octet-stream', # Default
- '.py': 'text/plain',
- '.c': 'text/plain',
- '.h': 'text/plain',
- '.ico': 'image/x-icon',
- })
-
-
-
-def test(HandlerClass = ThemedHTTPRequestHandler,
- ServerClass = BaseHTTPServer.HTTPServer):
- BaseHTTPServer.test(HandlerClass, ServerClass)
-
-
-if __name__ == '__main__':
- test()
Added: z3/deliverance/branches/packaged/deliverance/handtransform.py
==============================================================================
--- (empty file)
+++ z3/deliverance/branches/packaged/deliverance/handtransform.py Mon Oct 9 22:03:44 2006
@@ -0,0 +1,124 @@
+import sys
+from lxml import etree
+from htmlserialize import tostring
+import urllib
+from interpreter import Renderer as PythonRenderer
+from xslt import Renderer as XSLTRenderer
+from optparse import OptionParser
+import re
+import os
+
+"""
+Command line utility to run a deliverance transform
+given the urls of the rules, theme and content.
+
+
+themeurl, rulesfile and baseurl can be rolled into a file specified with -f
+it should contain an element like
+<blend theme="themeurl" baseurl="baseurl" rules="rulesfile" />
+
+
+
+"""
+
+
+DEFAULT_BASE_URL = "http://www.example.com"
+
+
+def grab_url(url):
+ f = urllib.urlopen(url)
+ data = f.read()
+ f.close()
+ return data
+
+def do_transform(renderer_type, theme_url, base_url, rules_url, content_url):
+ rules = etree.XML(grab_url(rules_url))
+ theme = etree.HTML(grab_url(theme_url))
+ content = etree.HTML(grab_url(content_url))
+
+ def reference_resolver(href, parse, encoding=None):
+ if not href.startswith('/'):
+ href = os.path.join(os.path.dirname(rules_url),href)
+ text = grab_url(href)
+ if parse == "xml":
+ return etree.XML(text)
+ elif encoding:
+ return text.decode(encoding)
+
+ renderer = None
+ if renderer_type == 'xslt':
+ renderer = XSLTRenderer(theme,base_url,rules,reference_resolver)
+ elif renderer_type == 'py':
+ renderer = PythonRenderer(theme,base_url,rules,reference_resolver)
+ else:
+ print "Unknown renderer type '" + renderer_type + "'"
+ return etree.Element("error")
+
+ return renderer.render(content)
+
+
+def parse_blend_file(filename):
+ b = etree.XML(open(filename).read())
+ return b.get('theme'),b.get('baseurl'),b.get('rules')
+
+
+def die(message,parser):
+ print message
+ parser.print_usage()
+ sys.exit(0)
+
+if __name__ == '__main__':
+
+
+ usage = "usage: %prog [options] <content_url>"
+ parser = OptionParser(usage=usage)
+ parser.add_option("-t","--theme",dest="theme_url",help="url of theme html")
+ parser.add_option("-b","--baseurl",dest="base_url",
+ help="relative urls in the theme will be made absolute relative to this url [default %default]",
+ default=DEFAULT_BASE_URL)
+ parser.add_option("-r","--rules",dest="rules_file",
+ help="path to file containing the deliverance rules to apply")
+ parser.add_option("-f","--from-file",dest="blend_file",
+ help="take theme, baseurl and rules parameters from the referenced file")
+ parser.add_option("-R","--renderer",dest="renderer_type",
+ help="(xslt|py) [default %default]", default="xslt", choices=['xslt','py'])
+
+ (options,args) = parser.parse_args()
+
+ if len(args) == 0:
+ die("no content url specified.",parser)
+
+ content_url = args[0]
+ theme_url = None
+ base_url = None
+ rules_file = None
+
+
+ if options.blend_file:
+ if (options.rules_file or options.theme_url or options.base_url != DEFAULT_BASE_URL):
+ die("cannot specify base url, rules file or theme url when taking parameters from file.",parser)
+
+ try:
+ theme_url,base_url,rules_file = parse_blend_file(options.blend_file)
+
+ except Exception,message:
+ die(message,parser)
+
+ else:
+ theme_url = options.theme_url
+ rules_file = options.rules_file
+ base_url = options.base_url
+
+
+ if theme_url is None:
+ die("no theme url specified.",parser)
+
+ if rules_file is None:
+ die("no rules file specified.",parser)
+
+ if base_url is None:
+ die("no base url specified",parser)
+
+
+ print tostring(do_transform(options.renderer_type,theme_url,base_url,rules_file,content_url))
+
Added: z3/deliverance/branches/packaged/deliverance/htmlserialize.py
==============================================================================
--- (empty file)
+++ z3/deliverance/branches/packaged/deliverance/htmlserialize.py Mon Oct 9 22:03:44 2006
@@ -0,0 +1,39 @@
+from lxml import etree
+
+
+html_xsl = """
+<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:output method="html" encoding="UTF-8" />
+ <xsl:template match="/">
+ <xsl:copy-of select="."/>
+ </xsl:template>
+</xsl:transform>
+"""
+
+# TODO: this should do real formatting
+pretty_html_xsl = """
+<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:output method="html" indent="yes" />
+ <xsl:template match="/">
+ <xsl:copy-of select="."/>
+ </xsl:template>
+</xsl:transform>
+"""
+
+html_transform = etree.XSLT(etree.XML(html_xsl))
+pretty_html_transform = etree.XSLT(etree.XML(pretty_html_xsl))
+
+
+#
+# creates an HTML string representation of the document given
+#
+# note: this will create a meta http-equiv="Content" tag in the head
+# and may replace any that are present
+#
+def tostring(doc,pretty = False):
+ if pretty:
+ return str(pretty_html_transform(doc))
+ else:
+ return str(html_transform(doc))
+
+
Added: z3/deliverance/branches/packaged/deliverance/interpreter.py
==============================================================================
--- (empty file)
+++ z3/deliverance/branches/packaged/deliverance/interpreter.py Mon Oct 9 22:03:44 2006
@@ -0,0 +1,263 @@
+from lxml import etree
+import xinclude
+import copy
+import utils
+from utils import RuleSyntaxError
+from utils import RendererBase
+
+class Renderer(RendererBase):
+ """
+ implements a deliverance renderer programmatically using
+ lxml api. The rules, theme and content are all processed at
+ render time.
+ """
+
+ def __init__(self, theme, theme_uri, rules, reference_resolver=None):
+ self.theme = self.fixup_links(theme, theme_uri)
+ self.remove_http_equiv_metas(self.theme)
+ self.rules = rules
+ # perform xincludes on the rules
+ if reference_resolver:
+ xinclude.include(self.rules, loader=reference_resolver)
+
+
+ def render(self, content):
+ result = copy.deepcopy(self.theme)
+ input = copy.deepcopy(content)
+ self.remove_http_equiv_metas(input)
+ self.apply_rules(self.rules,result,input)
+ return result
+
+
+ def apply_rules(self,rules,theme,content):
+ for rule in rules:
+ self.apply_rule(rule,theme,content)
+
+
+ def apply_rule(self,rule,theme,content):
+ if rule.tag == self.APPEND_RULE_TAG:
+ self.apply_append(rule,theme,content)
+ elif rule.tag == self.PREPEND_RULE_TAG:
+ self.apply_prepend(rule,theme,content)
+ elif rule.tag == self.REPLACE_RULE_TAG:
+ self.apply_replace(rule,theme,content)
+ elif rule.tag == self.COPY_RULE_TAG:
+ self.apply_copy(rule,theme,content)
+ elif rule.tag == self.APPEND_OR_REPLACE_RULE_TAG:
+ self.apply_append_or_replace(rule,theme,content)
+ elif rule.tag == self.SUBRULES_TAG:
+ self.apply_rules(rule,theme,content)
+ elif rule.tag is etree.Comment:
+ pass
+ else:
+ raise RuleSyntaxError(
+ "Rule %s (%s) not understood" % (
+ rule.tag, etree.tostring(rule)))
+
+ def apply_append(self,rule,theme,content):
+ theme_el = self.get_theme_el(rule,theme)
+ if theme_el is None:
+ return
+
+ content_els = copy.deepcopy(content.xpath(rule.attrib[self.RULE_CONTENT_KEY]))
+
+ if (len(content_els) == 0):
+ return
+
+ non_text_els = self.elements_in(content_els)
+ self.strip_tails(non_text_els)
+
+ # the xpath may return a mixture of strings and elements, handle strings
+ # by attaching them to the proper element
+ if (type(content_els[0]) is type(str())):
+ # if the element we're appending to has children, the text is
+ # appended to the tail of the last child.
+ if len(theme_el):
+ if theme_el[-1].tail:
+ theme_el[-1].tail += content_els[0]
+ else:
+ theme_el[-1].tail = content_els[0]
+ # otherwise, the text is appeded to the text attribute of the
+ # element we're appending to
+ else:
+ if theme_el.text:
+ theme_el.text += content_els[0]
+ else:
+ theme_el.text = content_els[0]
+
+ self.attach_tails(content_els)
+ theme_el.extend(non_text_els)
+
+ def apply_prepend(self,rule,theme,content):
+ theme_el = self.get_theme_el(rule,theme)
+ if theme_el is None:
+ return
+
+ content_els = copy.deepcopy(content.xpath(rule.attrib[self.RULE_CONTENT_KEY]))
+
+ if (len(content_els) == 0):
+ return
+
+ non_text_els = self.elements_in(content_els)
+
+ # if we only get some text, just tack it on and return
+ if len(non_text_els) == 0 and type(content_els[0]) is type(str()):
+ if theme_el.text:
+ theme_el.text = content_els[0] + theme_el.text
+ else:
+ theme_el.text = content_els[0]
+ return
+
+ # here we have some elements and possibly some text
+
+ self.strip_tails(non_text_els)
+
+ # the xpath may return a mixture of strings and elements, handle the
+ # first string by making it the text of the parent element. In any
+ # case if the parent element has text, we need put it after the
+ # elements we're prepending so we save it here
+ old_start_text = theme_el.text
+ if (type(content_els[0]) is type(str())):
+ theme_el.text = content_els[0]
+ else:
+ theme_el.text = None
+
+ self.attach_tails(content_els)
+ for index,el in enumerate(non_text_els):
+ theme_el.insert(index,el)
+
+ # tack on the previous text of the parent element
+ if old_start_text:
+ if (non_text_els[-1].tail):
+ non_text_els[-1].tail += old_start_text
+ else:
+ non_text_els[-1].tail = old_start_text
+
+ def apply_replace(self,rule,theme,content):
+ theme_el = self.get_theme_el(rule,theme)
+ if theme_el is None:
+ return
+
+ content_els = copy.deepcopy(content.xpath(rule.attrib[self.RULE_CONTENT_KEY]))
+
+ if len(content_els) == 0:
+ self.attach_text_to_previous(theme_el,theme_el.tail)
+ theme_el.getparent().remove(theme_el)
+ return
+
+ non_text_els = self.elements_in(content_els)
+ self.strip_tails(non_text_els)
+
+
+ # the xpath may return a mixture of strings and elements, handle strings
+ # by attaching them to the proper element
+ if (type(content_els[0]) is type(str())):
+ # text must be appended to the tail of the most recent sibling or appended
+ # to the text of the parent of the replaced element
+ self.attach_text_to_previous(theme_el,content_els[0])
+
+ if len(non_text_els) == 0:
+ self.attach_text_to_previous(theme_el,theme_el.tail)
+ theme_el.getparent().remove(theme_el)
+ return
+
+ self.attach_tails(content_els)
+
+ # this tail, if there is one, should stick around
+ preserve_tail = non_text_els[0].tail
+
+ self.replace_element(theme_el, non_text_els[0])
+ temptail = non_text_els[0].tail
+ non_text_els[0].tail = None
+ parent = non_text_els[0].getparent()
+ i = parent.index(non_text_els[0])
+ for index,cel in enumerate(non_text_els[1:]):
+ parent.insert(i + index + 1,cel)
+
+ if non_text_els[-1].tail:
+ non_text_els[-1].tail += temptail
+ else:
+ non_text_els[-1].tail = temptail
+
+ # tack in any preserved tail we stored above
+ if preserve_tail:
+ if non_text_els[0].tail:
+ non_text_els[0].tail = preserve_tail + non_text_els[0].tail
+ else:
+ non_text_els[0].tail = preserve_tail
+
+
+ def apply_copy(self,rule,theme,content):
+ theme_el = self.get_theme_el(rule,theme)
+ if theme_el is None:
+ return
+
+ content_els = copy.deepcopy(content.xpath(rule.attrib[self.RULE_CONTENT_KEY]))
+
+ if len(content_els) == 0:
+ return
+
+ non_text_els = self.elements_in(content_els)
+ self.strip_tails(non_text_els)
+ # attach any leading matched text as the text of the element
+ # we're copying into
+ if (type(content_els[0]) is type(str())):
+ theme_el.text = content_els[0]
+ # otherwise knock out any existing text
+ else:
+ theme_el.text = None
+
+ self.attach_tails(content_els)
+ theme_el[:] = non_text_els
+
+ def apply_append_or_replace(self,rule,theme,content):
+ theme_el = self.get_theme_el(rule,theme)
+ if theme_el is None:
+ return
+
+ content_xpath = rule.attrib[self.RULE_CONTENT_KEY]
+ remove_tag = self.get_tag_from_xpath(content_xpath)
+
+ if remove_tag is None:
+ self.add_to_body_start(theme,self.format_error("invalid xpath for content", rule=rule))
+ return
+
+ for el in theme_el:
+ if el.tag == remove_tag:
+ theme_el.remove(el)
+
+ content_els = copy.deepcopy(content.xpath(content_xpath))
+ self.strip_tails(content_els)
+ theme_el.extend(content_els)
+
+
+ def elements_in(self, els):
+ """
+ return a list containing elements from els which are not strings
+ """
+ return [x for x in els if type(x) is not type(str())]
+
+
+
+ def strip_tails(self, els):
+ for el in els:
+ el.tail = None
+
+
+ def attach_tails(self,els):
+ """
+ whereever an lxml element in the list is followed by
+ a string, set the tail of the lxml element to the string
+ """
+ for index,el in enumerate(els):
+ # if we run into a string after the current element,
+ # attach it to the current element as the tail
+ if (type(el) is not type(str()) and
+ index + 1 < len(els) and
+ type(els[index+1]) is type(str())):
+ el.tail = els[index+1]
+
+
+
+
+
Deleted: /z3/deliverance/branches/packaged/deliverance/main.py
==============================================================================
--- /z3/deliverance/branches/packaged/deliverance/main.py Mon Oct 9 22:03:44 2006
+++ (empty file)
@@ -1,157 +0,0 @@
-import os
-from lxml import etree
-from time import time
-from lxml.etree import Namespace, ElementBase, XMLParser
-try:
- from lxml.etree import ElementNamespaceClassLookup
-except ImportError:
- ElementNamespaceClassLookup = None
-
-nsmap = {
- "dv": "http://www.plone.org/deliverance",
- "html": "http://www.w3.org/1999/xhtml",
- "xsl": "http://www.w3.org/1999/XSL/Transform",
- "at": "http://plone.org/archetypes",
- }
-
-parser = XMLParser()
-if ElementNamespaceClassLookup is not None:
- # Earlier versions of lxml did class lookup in all
- # cases; newer versions require this explicit parser
- # setup
- lookup = ElementNamespaceClassLookup()
- parser.setElementClassLookup(lookup)
-
-class AppMap:
-
- def __init__(self, layout_dir):
-
- # Open the appmap file, make a tree, and process XIncludes
- self.module_dir = os.path.dirname(os.path.abspath(__file__))
- self.layout_dir = os.path.join(self.module_dir, layout_dir)
- layoutsfn = os.path.join(self.layout_dir, "appmap.xml")
- self.tree = etree.ElementTree(
- file=layoutsfn, parser=parser)
- self.tree.xinclude()
-
- # Make a themeprocessor to style all outgoing pages. Note that the
- # .processor attribute comes from an lxml namespace binding, meaning it is
- # defined via a custom Python class defined below (class LayoutElement)
- root = self.tree.getroot()
- layout = root.xpath("dv:layouts/dv:layout", nsmap)[0]
- #self.themeprocessor = make_processor(layout)
- self.themeprocessor = layout.processor
-
-
- def publish(self, xmlstring):
- """Given a string of XML, theme it"""
-
- resource = etree.XML(xmlstring)
- response = str(self.themeprocessor(resource))
-
- return response
-
-# The following are extensions based on lxml namespace extensions. It
-# adds Python behavior to XML nodes.
-
-class DVRuleBase(ElementBase):
-
- def getThemeNode(self):
- """Get a node in the theme doc"""
-
- # Current node is a rule, get xpath from the @theme attr
- themedoc = self.xpath("../../dv:theme", nsmap)[0][0]
- xpath = self.get("theme")
- try:
- themenode = themedoc.xpath(xpath, nsmap)[0]
- except IndexError:
- msg = "Themedoc has no node at: %s" % xpath
- print msg
- themenode = None
-
- return themenode
-
-
-class LayoutElement(ElementBase):
-
- def processor(self):
- """Make XSLT processor by changing theme based on rules"""
-
- # Apply all the rules
- for rule in self.xpath("./dv:rules/*", nsmap):
- rule.apply()
-
- # Merge applied rules into compilerdoc
- compilerroot = self.xpath("../dv:compiler/xsl:stylesheet", nsmap)[0]
- themeroot = self.xpath("dv:theme/html:html", nsmap)[0]
- target = compilerroot.xpath("xsl:template[@match='/']", nsmap)[0]
- target.append(themeroot)
-
- #print etree.tostring(compilerroot)
-
- return etree.XSLT(compilerroot)
-
- processor = property(processor)
-
-
-class RuleReplaceElement(DVRuleBase):
-
- def apply(self):
- # TODO: Someething here
- themenode = self.getThemeNode()
- if themenode is None:
- return
- del(themenode[:])
- themenode.text = None
- xslvalueof = etree.SubElement(themenode,
- "{%s}value-of" % nsmap["xsl"])
- xslvalueof.set("select", self.get("content"))
-
-
-class RuleCopyElement(DVRuleBase):
-
- def apply(self):
- themenode = self.getThemeNode()
- if themenode is None:
- return
- del(themenode[:])
- themenode.text = None
- xslvalueof = etree.SubElement(themenode,
- "{%s}apply-templates" % nsmap["xsl"])
- xslvalueof.set("select", self.get("content"))
-
-
-class RuleAppendElement(DVRuleBase):
-
- def apply(self):
- themenode = self.getThemeNode()
- if themenode is None:
- return
- xslvalueof = etree.SubElement(themenode,
- "{%s}apply-templates" % nsmap["xsl"])
- xslvalueof.set("select", self.get("content"))
-
-
-# Bind Python classes for lxml namespace support
-namespace = Namespace(nsmap['dv'])
-namespace['layout'] = LayoutElement
-namespace['replace'] = RuleReplaceElement
-namespace['copy'] = RuleCopyElement
-namespace['append'] = RuleAppendElement
-
-
-def timeit(xmlstring):
- appmap = AppMap()
- start = time()
- iters = 50
- for i in range(iters):
- result = appmap.publish(xmlstring)
- print "*** Average time:", (time() - start) / iters, " ***\n"
- print result[0:2000]
-
-def main():
- xmlstring = open("content/index.html").read()
- timeit(xmlstring)
-
-if __name__ == "__main__":
- main()
Deleted: /z3/deliverance/branches/packaged/deliverance/mpfilter.py
==============================================================================
--- /z3/deliverance/branches/packaged/deliverance/mpfilter.py Mon Oct 9 22:03:44 2006
+++ (empty file)
@@ -1,70 +0,0 @@
-"""
-Deliverance theming for mod_python filters
-
-Deliverance applies a theme to content. This mod_python module acts as an
-Apache "filter", transforming content as it passes through Apache.
-
-This module gets imported by mod_python during its startup. Thus, the
-appmap instance becomes a global, computed only once. If you need to
-recompute the theme, for example, restart the Apache.
-"""
-import time
-from cStringIO import StringIO
-
-from mod_python import apache
-from deliverance.main import AppMap
-appmap = AppMap() # Theme is generated once at module import time
-
-def outputfilter(filter):
- if not hasattr(filter.req, 'notheme'):
- # Check for a flag to not apply theme
- args = filter.req.args
- if args and args.find("notheme") > -1:
- filter.req.notheme = True
- else:
- filter.req.notheme = False
-
- try:
- streambuffer = filter.req.streambuffer
- except AttributeError:
- if filter.req.notheme:
- # pass on if no theme
- filter.pass_on()
- return
- elif not filter.req.headers_out.has_key("content-type"):
- # pass on if no content type specified
- filter.pass_on()
- return
- elif not filter.req.headers_out["content-type"].startswith("text/html"):
- # pass on if not HTML
- filter.pass_on()
- return
-
- filter.req.streambuffer = StringIO()
- streambuffer = filter.req.streambuffer
-
- streamlet = filter.readline()
- while streamlet:
- streambuffer.write(streamlet)
- streamlet = filter.readline()
-
- if streamlet is None:
- output = appmap.publish(streambuffer.getvalue())
- filter.req.headers_out["Content-Length"] = str(len(output))
- filter.write(output)
- filter.close()
-
-
-def handler(req):
- """Basic filter applying to all mime types it is registered for"""
-
- # Get the path, strip off leading slash, and convert to a
- # dotted notation for xml:id compatibility
- path_info = req.path_info[1:]
- dotted_path = path_info.replace("/", ".")
-
- response = appmap.publish(dotted_path)
- req.content_type = "text/html"
- req.write(response)
-
- return apache.OK
Deleted: /z3/deliverance/branches/packaged/deliverance/renderer.xsl
==============================================================================
--- /z3/deliverance/branches/packaged/deliverance/renderer.xsl Mon Oct 9 22:03:44 2006
+++ (empty file)
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:trois="http://www.plone.org/trois" xmlns="http://www.w3.org/1999/xhtml"
- xmlns:html="http://www.w3.org/1999/xhtml"
- xmlns:at="http://plone.org/archetypes" exclude-result-prefixes="trois at html" version="1.0">
- <xsl:output indent="yes"/>
- <xsl:param name="pathinfo">localhello</xsl:param>
- <xsl:param name="siteurl">/sandboxes/trois/trunk/deliverance/examples/plonenet.py</xsl:param>
- <xsl:variable name="contentnode" select="id($pathinfo)"/>
- <xsl:template match="/">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>
- <xsl:value-of select="$contentnode/@title"/>
- </title>
- </head>
- <body>
- <div id="navtree">
- <xsl:apply-templates select="id('root')" mode="navtree"/>
- </div>
- <div id="pagecontent">
- <xsl:apply-templates select="$contentnode"/>
-
- </div>
-
- </body>
- </html>
- </xsl:template>
- <xsl:template match="at:collection" mode="navtree">
- <div
- style="float:left; width: 10em; background-color: yellow; height: 10em; margin-right: 5em">
- <h2 style="text-align: center">sitenav</h2>
- <ul>
- <xsl:for-each select=".//*[@name]">
- <li>
- <a href="{$siteurl}/{@name}">
- <xsl:value-of select="@title"/>
- </a>
- </li>
- </xsl:for-each>
- </ul>
-
- </div>
- </xsl:template>
-
- <xsl:template match="at:providers">
- <ul>
- <li>Item one</li>
- <xsl:for-each select="at:provider">
- <li>
- <xsl:value-of select="@title"/>
- </li>
- </xsl:for-each>
- </ul>
- </xsl:template>
-
- <xsl:template match="at:provider">
- <p>
- <xsl:value-of select="@title"/>
- </p>
- </xsl:template>
-
- <xsl:template match="at:localfile">
- <xsl:copy-of select="html:html/html:body/*"/>
- </xsl:template>
-
-</xsl:stylesheet>
Added: z3/deliverance/branches/packaged/deliverance/test-data/nabuur/nabuur.html
==============================================================================
--- (empty file)
+++ z3/deliverance/branches/packaged/deliverance/test-data/nabuur/nabuur.html Mon Oct 9 22:03:44 2006
@@ -0,0 +1,556 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
+<meta http-equiv="content-language" content="en" />
+<meta name="robots" content="index,follow" />
+<meta name="keywords" content="Volunteer, Volunteering, Online volunteer
+opportunities, Nabuur" />
+<meta name="description" content="1001 Online volunteering opportunities.
+Everyone has something important to offer. We need you. Check it out at
+NABUUR.COM!" />
+<meta name="rating" content="general" />
+<meta name="author" content="Nabuur" />
+<meta name="copyright" content="Copyright © 2003 - 2004" />
+<title>Nabuur volunteer opportunities | Volunteer in Bukavu DR of the Congo</title>
+<link href="http://www.nabuur.com/favicon.ico" rel="SHORTCUT ICON" />
+
+<link rel="stylesheet" type="text/css" media="all" href="http://www.nabuur.com/xoops.css" />
+<link rel="stylesheet" type="text/css" media="all" href="http://www.nabuur.com/themes/nabuur_new/styleNN.css" />
+
+<style type="text/css">
+#fadeinbox{
+position:absolute;
+width: 300px;
+left: 0;
+top: -400px;
+border: 2px solid white;
+background-color: #7a0c14;
+color: white;
+padding: 4px;
+z-index: 100;
+visibility:hidden;
+}
+</style>
+
+
+<!-- script to include for enquete on homepage -->
+<!--<script src='http://www.nabuur.com/survey.js' language='javascript'></script>-->
+<SCRIPT type="text/javascript">
+<!--
+ /*
+ function checkCount()
+ {
+ return false;
+
+ if (!locallink)
+ {
+ var count = GetCookie('count');
+ if (count == null)
+ {
+ count=1;
+ SetCookie('count', count, exp);
+ window.open(page, "", windowprops);
+ }
+ else
+ {
+ count++;
+ SetCookie('count', count, exp);
+ }
+ }
+
+ }
+
+ function showlayernow()
+ {
+ count=1;
+ SetCookie('count', count, exp);
+ initfunction_enq();
+ }
+
+ function checkCount2()
+ {
+ var count = GetCookie('count');
+ if (count == null)
+ {
+ setTimeout('showlayernow()', 20*1000);
+ }
+ else
+ {
+ count++;
+ SetCookie('count', count, exp);
+ }
+ }
+*/
+//window.attachEvent("onload", checkCount2);
+//window.attachEvent("onunload", checkCount);
+
+function newImage(arg) {
+ if (document.images) {
+ rslt = new Image();
+ rslt.src = arg;
+ return rslt;
+ }
+}
+
+function changeImages() {
+ if (document.images && (preloadFlag == true)) {
+ for (var i=0; i<changeImages.arguments.length; i+=2) {
+ document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
+ }
+ }
+}
+
+// -->
+</SCRIPT>
+<!-- RMV: added module header -->
+<script type="text/javascript">
+<!--
+//--></script><script type="text/javascript" src="http://www.nabuur.com/include/xoops.js"></script><script type="text/javascript"><!--
+
+//-->
+
+ /*
+ var locallink=false;
+ function setupLinks()
+ {
+ for (var i=0;i<document.links.length;i++)
+ {
+ if ((document.links[i].href.substring(0, 4) != 'http') || (document.links[i].href.substring(0, 21) == 'http://www.nabuur.com') )
+ {
+ if(!document.links[i].onclick)
+ {
+ document.links[i].onclick = function(){ locallink = true; };
+ }
+ }
+ }
+
+ for (var i=0;i<document.forms.length;i++)
+ {
+ if (document.forms[i].name != 'chatForm')
+ { document.forms[i].onsubmit = function(){ locallink = true;} }
+ }
+
+ }
+
+ window.attachEvent("onload", setupLinks);
+ window.attachEvent("onload", checkCount2);
+*/
+</script>
+<!-- onLoad="checkCount2(); setupLinks();" onUnload="checkCount();"-->
+</head>
+<body class="bodyHome printversion">
+
+ <script type="text/javascript">
+ var page = "http://www.nabuur.com/enquete_question1.php";
+ var windowprops = "width=700,height=400,location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes";
+ var expDays = 100;
+
+ function GetCookie(name)
+ {
+ var arg = name + "="; var alen = arg.length;
+ var clen = document.cookie.length;
+ var i = 0;
+ while (i < clen)
+ {
+ var j = i + alen;
+
+ if (document.cookie.substring(i, j) == arg) { return getCookieVal (j); }
+
+ i = document.cookie.indexOf(" ", i) + 1;
+ if (i == 0) { break };
+ }
+ return null;
+ }
+
+ function SetCookie(name, value)
+ {
+ var argv = SetCookie.arguments;
+ var argc = SetCookie.arguments.length;
+ var expires = (argc > 2) ? argv[2] : null;
+ var path = (argc > 3) ? argv[3] : null;
+ var domain = (argc > 4) ? argv[4] : null;
+ var secure = (argc > 5) ? argv[5] : false;
+
+ document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : "");
+ }
+ function DeleteCookie(name)
+ {
+ var exp = new Date();
+ exp.setTime (exp.getTime() - 1);
+ var cval = GetCookie(name);
+ document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
+ }
+
+ var exp = new Date(); exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
+
+ function amt()
+ {
+ var count = GetCookie('count');
+ if(count == null)
+ {
+ SetCookie('count','1');
+ return 1;
+ }
+ else
+ {
+ var newcount = parseInt(count) + 1;
+ DeleteCookie('count');
+ SetCookie('count',newcount,exp);
+ return count;
+ }
+ }
+
+ function getCookieVal(offset)
+ {
+ var endstr = document.cookie.indexOf(";", offset);
+ if (endstr == -1)
+ { endstr = document.cookie.length; }
+ return unescape(document.cookie.substring(offset, endstr));
+ }
+
+
+ </script>
+<div id="force-scrollbar"></div>
+<a name='top'></a>
+<div class='container'>
+
+ <!-- header -->
+
+ <table bgcolor='#2a603e' style='border: 0px solid white; border-left: 1px solid white; border-right: 1px solid white; ' width=757 cellspacing=0 cellpadding=0 >
+ <tr><td width=200 rowspan=2><a href="http://www.nabuur.com" onFocus="this.blur()"><img style='border-right: 1px solid white;' width=200 height=46 src="http://www.nabuur.com/themes/nabuur_new/images/logo_new.gif" title="NABUUR.COM, the global Neighbour network" alt="NABUUR.COM, the global Neighbour network" border="0" /></a></td>
+ <td colspan=14 align=center>
+
+<!-- Ticker start -->
+
+<!-- Ticker end -->
+ </td>
+ </tr>
+ <tr>
+ <td width=120></td>
+ <td class='headermenu' nowrap> </td>
+ <td class='headermenu' nowrap> </td>
+ <td class='headermenu' nowrap align=right>
+ <a href="http://www.nabuur.com/">Home</a>
+
+
+ </td>
+ <td class='headermenu' nowrap align=center>
+ | </td>
+ <td class='headermenu' nowrap align=center>
+ <a class="headerlink" href="http://www.nabuur.com/search.php" onFocus="this.blur()">Search</a>
+ </td>
+ <td class='headermenu' nowrap align=center>
+ |
+ </td>
+
+ <td class='headermenu' nowrap align=center>
+ <a class="headerlink" href="http://www.nabuur.com/modules/freepage/article.php?articleid=5" onFocus="this.blur()">About NABUUR.COM</a>
+ </td>
+ <td class='headermenu' nowrap align=center>
+ |
+ </td>
+ <td class='headermenu2' nowrap align=center>
+ <a class="headerlink2" href="http://www.nabuur.com/modules/freepage/article.php?articleid=4" onFocus="this.blur()">what can I do?</a>
+ </td>
+
+ <td class='headermenu' nowrap align=center>
+ |
+ </td>
+ <td class='headermenu' nowrap align=center>
+ <a class="headerlink" href="http://www.nabuur.com/user.php?xoops_redirect=%2Fmodules%2Fvillages_issues%2Findex.php%3Fvillageid%3D235" onFocus="this.blur()">Login</a>
+ </td>
+ <td class='headermenu' nowrap align=center>
+ |
+ </td>
+ <td class='headermenu' nowrap align=center>
+
+ <a class="headerlink" href="http://www.nabuur.com/register.php" onFocus="this.blur()">Join now</a>
+ </td>
+ <td class='headermenu' nowrap></td>
+ </tr>
+ </table>
+
+
+
+ <div class='content printversion'>
+
+ <!-- leftcenterblock - use as top row -->
+
+
+
+
+
+ <!-- left row + content block -->
+ <table style='border-left: 1px solid white; border-right: 0px solid white; border-top: 0px; border-bottom: 0px solid white;' width=755 border=0 cellspacing=0 cellpadding=0>
+ <tr><td><table cellspacing=0 cellpadding=0 border=0 width=755 style='border-right: 0px solid white;'>
+ <tr>
+
+
+
+
+ <td width='754' bgcolor='#FFFFFF' valign=top> <!-- <td width='754' bgcolor='#7e5501' valign=top> -->
+
+ <!-- content -->
+ <script type="text/javascript" src="http://www.nabuur.com/modules/villages_issues/checks.js"></script>
+<table class="tbl_village_white" cellpadding="0" cellspacing="0" border="0" style='border-top: 1px solid white; '>
+
+ <tr>
+ <td colspan="2" class="td_top_bar" valign="middle"><div id="village_breadcrumb1"><a style="text-decoration:none; " href="http://www.nabuur.com/modules/villages_issues/index.php?villageid=235"><span class="breadCrumbVillagename">Bukavu</span></a>
+ <a href="http://www.nabuur.com">Home</a>»<a href="http://www.nabuur.com/modules/villages/list_continent_villages.php?continentid=Africa">Africa</a>»<a href="http://www.nabuur.com/modules/villages/list_country_villages.php?countryid=13">DR of the Congo</a>»<a href="http://www.nabuur.com/modules/villages_issues/index.php?villageid=235">Bukavu</a>»<a href="http://www.nabuur.com/modules/villages_issues/index.php?villageid=235" style="text-decoration:none;" >Issue</a>
+
+ </div>
+ </td>
+
+ </tr>
+
+ <tr>
+ <td colspan="2" height="25" style="margin:0px; background-image:url(http://www.nabuur.com/images/vtabs_1_white.gif); background-position:left; background-repeat: no-repeat;background-color: #996600; "><table class="tbl_tab_village" cellpadding="0" cellspacing="0" border="0" >
+ <tr>
+ <td class="td_tab_end"></td>
+ <td class="td_tab_text_white" ><a href="http://www.nabuur.com/modules/villages_issues/index.php?villageid=235" onFocus='this.blur();' style="display: block; width: 120px; height: 20px; text-align: middle; padding-top: 5px; text-decoration: none; color: #663300;">Issue</a></td>
+ <td class="td_tab_text" ><a href="http://www.nabuur.com/modules/villages_home/locallife.php?villageid=235" onFocus='this.blur();' style="display: block; width: 120px; height: 20px; text-align: middle; padding-top: 5px; text-decoration: none">Stories & Photos</a></td>
+ <td class="td_tab_text" ><a href="http://www.nabuur.com/modules/neighbors_village/list_neighbors_village.php?villageid=235" onFocus='this.blur();' style="display: block; width: 120px; height: 20px; text-align: middle; padding-top: 5px; text-decoration: none">Neighbours</a></td>
+
+ <td class="td_tab_text" ><a href="http://www.nabuur.com/modules/villages_home/whatsnew.php?villageid=235" onFocus='this.blur();' style="display: block; width: 120px; height: 20px; text-align: middle; padding-top: 5px; text-decoration: none">What´s new</a></td>
+
+ <td width="50"></td>
+ </tr>
+ </table></td>
+ </tr>
+ <tr><td colspan="2" height="10"></td></tr>
+ <tr><td align="left" valign="top"><table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+
+ <td width="260" valign="top" align="center"><table cellpadding="0" cellspacing="0" border="0" width="213">
+ <tr><td class="titleBigWhite_white" align="left">Bukavu: Women and young girls victims of violence</td></tr>
+ <tr>
+ <td class="td_text_village_white">The context of war which characterized the city of Bukavu during several years has caused a procession of violence of all kinds. Its principal victims have been women and young girls. The large number of women and girls that fell victim to violence, rape, prostitution and abandonment is a big issue in the community. <a style="color: #663300; " href="http://www.nabuur.com/modules/villages_issues/index.php?villageid=235&rm=issue&issueId=332">Read more...</a></td>
+ </tr>
+ <tr><td height="30"> </td></tr>
+ <tr>
+ <td valign="middle" align="center"><table cellpadding="5" cellspacing="0" border="0" width="213" style="background-color: #7a0c14 ">
+
+ <tr>
+ <td align="center" valign="middle" style="cursor: hand; cursor: pointer; " onClick="javascript:window.location='http://www.nabuur.com/register.php?villageid=235&redirect_page=%2Fmodules%2Fvillages_issues%2Findex.php%3Fvillageid%3D235'"><span style="font-size: 12px; font-weight:bold">Help Bukavu<br /><a href="http://www.nabuur.com/register.php?villageid=235&redirect_page=%2Fmodules%2Fvillages_issues%2Findex.php%3Fvillageid%3D235">Join as an online volunteer</a></span></td>
+ </tr>
+ </table></td>
+ </tr>
+ </table></td>
+ <td width="12" style="border-right: 1px solid #996600; "> </td>
+ <td width="477" valign="top" align="center"><table cellpadding="0" cellspacing="0" border="0" width="455">
+ <tr>
+
+ <td class="td_overview_left_village_fac" valign="top" rowspan=3>
+ <div style="position: relative; width: 60px; height:90px; top:3px; left: 0px;">
+ <div style="position: absolute; top: 0px; left: 0px; text-align:left "><a href="http://www.nabuur.com/userinfo.php?uid=4435"><img src="http://www.nabuur.com/uploads/cavt441c3b18e9c49.jpg" alt="The Local Representative represents the people of Bukavu on these web pages" title="The Local Representative represents the people of Bukavu on these web pages" width="60" height="75" align="left" /></a></div>
+ </div>
+ <div class="td_avatar_white"><a style="color: #663300; " href="http://www.nabuur.com/userinfo.php?uid=4435"><strong>Amina Gisèle</strong><br /></a>Local Representative </div>
+ </td>
+ <td class="titleBigWhite_white" align="left" height="25">Focus: Setting up a Women Trauma and Care Centre</td>
+ </tr>
+
+ <tr>
+ <td class="td_text_village_white">100 women have united in ?Women Against Violence?. Their ambition is to start a Women Trauma and Care Centre. The Centre will assist women victims of violence and abuse. It will give them a space where they can see hope again, know about their health, learn self-help skills and help each other campaign for their rights. <a style="color: #663300; " href="/modules/villages_issues/index.php?villageid=235&rm=focus&focusId=361">Read more...</a>
+
+ </td>
+ </tr>
+ <tr><td colspan="2" style="height:10px; border-bottom: 1px solid; border-color: #996600; "> </td></tr>
+ <tr><td colspan="2" style="height:10px; "></td></tr>
+ <tr><td class="td_overview_left_village_fac" rowspan=3 align="left">
+
+ <div style="position: relative; width: 60px; height:90px; top:3px; left: 0px;">
+ <div style="position: absolute; top: 0px; left: 0px; text-align:left "><a href="http://www.nabuur.com/userinfo.php?uid=5591"><img src="http://www.nabuur.com/uploads/cavt444fc2c1d0d5f.jpg" alt="The Facilitator is an online volunteer who coordinates the efforts of the other volunteers ('Neighbours') of this Village" title="The Facilitator is an online volunteer who coordinates the efforts of the other volunteers ('Neighbours') of this Village" width="60" height="75" align="left" /></a></div>
+
+ </div>
+ <div class="td_avatar_white"><a style="color: #663300; " href="http://www.nabuur.com/userinfo.php?uid=5591"><strong>Maria Samper</strong><br /></a>Facilitator <br /><a style="color: #663300; " href="http://www.nabuur.com/modules/neighbors_village/list_neighbors_village.php?villageid=235&facilitatorId=5591">contact</a>
+ </div>
+ </td>
+ <td class="titleBigWhite_white" height="25" valign="top" align="left">Here´s what YOU can do</td></tr>
+ <tr>
+
+ <td class="td_text_village_white" valign="top"><table cellpadding="0" cellspacing="0" border="0" width="315" >
+ <tr><td colspan="2"><a style="color: #663300; font-weight: bold;" href="http://www.nabuur.com/modules/villages_issues/index.php?villageid=235&actionId=4821">Contact organizations that can provide our village with useful information to create a good project proposal and that could guide us on how to establish a succesful trauma center.</a></td></tr><tr><td colspan="2" height="10"></td></tr> <tr><td width="10" valign="top" style="color: #663300;">»</td><td><a style="color: #663300;" href="http://www.nabuur.com/modules/villages_issues/index.php?villageid=235&rm=focus&focusId=361#results">See the results of earlier actions</a></td></tr>
+ <tr><td width="10" valign="top" style="color: #663300;">»</td><td><a style="color: #663300;" href="http://www.nabuur.com/modules/villages_newsletter/index.php?villageid=235">Subscribe to the Bukavu newsletter</a></td></tr>
+ </table>
+ </td></tr>
+ <tr><td colspan="2" style="height:10px; border-bottom: 1px solid; border-color: #996600; "> </td></tr>
+ <tr><td colspan="2" style="height:10px; "></td></tr>
+ </table></td></tr>
+
+
+
+ </table></td>
+ </tr>
+ <tr><td height="10"></td></tr>
+
+ </table>
+<script type="text/javascript">
+ var svi = false;
+</script>
+
+ </td>
+
+
+
+
+
+
+
+
+
+ </tr>
+ </table>
+ </td></tr>
+ </table>
+
+ <!-- rightcenterblock - use as bottom row -->
+
+
+
+
+ </div>
+
+ <!-- footer -->
+ <table width=757 bgcolor='#2a603e' cellspacing=0 cellpadding=0 style='border: 0px solid white; border-top: 1px solid white; border-bottom: 1px solid white; border-left: 1px solid white; border-right: 1px solid white;'>
+
+ <tr><td height=6></td></tr>
+
+ <tr><td align=center class='footermenu'>
+ Volunteering in :
+ <a href='http://www.nabuur.com/modules/villages/list_continent_villages.php?continentid=Africa'>Africa</a>
+
+ -
+ <a href='http://www.nabuur.com/modules/villages/list_continent_villages.php?continentid=Asia'>Asia</a>
+ -
+ <a href='http://www.nabuur.com/modules/villages/list_continent_villages.php?continentid=Americas'>America</a>
+ </td></tr>
+ <tr><td align=center class='footermenu'>
+ <a class="footerlink" href="http://www.nabuur.com/modules/freepage/article.php?articleid=5" onFocus="this.blur()">About NABUUR.COM</a>
+ -
+ <a class="footerlink" href="http://www.nabuur.com/modules/freepage/article.php?articleid=4" onFocus="this.blur()">What can I do?</a>
+
+ -
+ <a class="footerlink" href="http://www.nabuur.com/modules/freepage/article.php?articleid=7" onFocus="this.blur()">Policy</a>
+ -
+ <a class="footerlink" href="http://www.nabuur.com/modules/xoopsfaq" onFocus="this.blur()">FAQ</a>
+ -
+ <a class="footerlink" href="http://www.nabuur.com/modules/contact/" onFocus="this.blur()">Contact</a>
+ -
+ <a class="footerlink" href="http://www.nabuur.com/sitemap/index.html" onFocus="this.blur()">Sitemap</a>
+
+ <!-- -
+ <a class="footerlink" href="#" onFocus="this.blur()">Sitemap</a> -->
+ -
+ <a class="footerlink" href="http://www.nabuur.com" onFocus="this.blur()">Home</a>
+ </td></tr>
+
+ <tr><td align=center class='footermenu'>
+ <a href='http://www.nabuur.com'>NABUUR.COM - Online Volunteering</a>
+ </td></tr>
+ <tr><td height=6></td></tr>
+
+ <!--
+ <tr>
+ <td class='footermenu' width=200>
+
+ <a title='Print this page' href='javascript:window.print();'><img src='http://www.nabuur.com/images/print_home.gif' height=13 border=0></a>
+
+ <a title='Tell a friend' href='mailto:?subject=Tell a Friend&body=Thought you would find the following website interesting:
+ http://www.nabuur.com/modules/villages_issues/index.php?villageid=235'><img src='http://www.nabuur.com/images/email_home.gif' height=13 border=0></a>
+
+ </td>
+ <td class='footermenu' width=100>
+
+ </td>
+ <td class='footermenu' nowrap>
+
+ </td>
+ <td class='footermenu' nowrap>
+
+
+ </td>
+ <td class='footermenu2' nowrap>
+
+ </td>
+ <td class='footermenu' nowrap>
+
+ </td>
+ <td class='footermenu' nowrap>
+
+ </td>
+ <td class='footermenu' nowrap>
+
+ </td>
+ <td class='footermenu' nowrap>
+
+ </td>
+ <td class='footermenu' nowrap>
+
+ </td>
+ <td class='footermenu' nowrap>
+
+ </td>
+ </tr>
+ -->
+ </table>
+
+
+
+</div>
+
+</DIV>
+
+<!--ONESTAT SCRIPTCODE START-->
+
+<script type="text/javascript">
+<!--
+// Account ID : 279277
+// Website URL: http://www.nabuur.com
+// Copyright (C) 2002-2006 OneStat.com All Rights Reserved
+function OneStat_Pageview()
+{
+ var d=document;
+ var sid="279277";
+ var CONTENTSECTION="";
+ var osp_ACTION="";
+ var osp_TRANSACTION="";
+ var osp_AMOUNT="";
+ var osp_PRODUCTCODE="";
+ var osp_PRODUCTGROUP="";
+ var osp_ADCAMPAIGN="";
+ var osp_URL=d.URL;
+ var osp_Title=d.title;
+ var t=new Date();
+ var p="http"+(d.URL.indexOf('https:')==0?'s':'')+"://stat.onestat.com/stat.aspx?tagver=2&sid="+sid;
+ p+="&url="+escape(osp_URL);
+ p+="&ti="+escape(osp_Title);
+ p+="§ion="+escape(CONTENTSECTION);
+ p+="&cma="+escape(osp_ACTION);
+ p+="&cmt="+escape(osp_TRANSACTION);
+ p+="&cmm="+escape(osp_AMOUNT);
+ p+="&cmp="+escape(osp_PRODUCTCODE);
+ p+="&cmg="+escape(osp_PRODUCTGROUP);
+ p+="&cmad="+escape(osp_ADCAMPAIGN);
+ p+="&rf="+escape(parent==self?document.referrer:top.document.referrer);
+ p+="&tz="+escape(t.getTimezoneOffset());
+ p+="&ch="+escape(t.getHours());
+ p+="&js=1";
+ p+="&ul="+escape(navigator.appName=="Netscape"?navigator.language:navigator.userLanguage);
+ if(osp_URL!=d.URL) p+="&ol="+escape(d.URL);
+ if(typeof(screen)=="object"){
+ p+="&sr="+screen.width+"x"+screen.height;p+="&cd="+screen.colorDepth;
+ p+="&jo="+(navigator.javaEnabled()?"Yes":"No");
+ }
+ d.write('<img id="ONESTAT_TAG" border="0" width="1" height="1" src="'+p+'" >');
+}
+
+OneStat_Pageview();
+//-->
+</script>
+<noscript>
+<a href="http://www.onestat.com"><img border="0" width="1" height="1" src="http://stat.onestat.com/stat.aspx?tagver=2&sid=279277&js=No&" ALT="OneStat.com Web Analytics"></a>
+</noscript>
+<!--ONESTAT SCRIPTCODE END-->
+</body>
+</html>
Added: z3/deliverance/branches/packaged/deliverance/test-data/nabuur/nabuur.theme
==============================================================================
--- (empty file)
+++ z3/deliverance/branches/packaged/deliverance/test-data/nabuur/nabuur.theme Mon Oct 9 22:03:44 2006
@@ -0,0 +1,6 @@
+
+<!-- helper file for doing hand transforms with this theme -->
+<blend
+ theme="./test-data/nabuur/nabuur.html"
+ baseurl="http://www.nabuur.com"
+ rules="./test-data/nabuur/rules.xml" />
Added: z3/deliverance/branches/packaged/deliverance/test-data/nabuur/rules.xml
==============================================================================
--- (empty file)
+++ z3/deliverance/branches/packaged/deliverance/test-data/nabuur/rules.xml Mon Oct 9 22:03:44 2006
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<rules xmlns:xi="http://www.w3.org/2001/XInclude" xmlns="http://www.plone.org/deliverance" >
+ <xi:include href="standardrules.xml" />
+
+ <copy theme="//table[@class='tbl_village_white']/tr[4]/td[1]" content="//table[@id='portal-columns']" />
+</rules>
Added: z3/deliverance/branches/packaged/deliverance/test-data/nabuur/standardrules.xml
==============================================================================
--- (empty file)
+++ z3/deliverance/branches/packaged/deliverance/test-data/nabuur/standardrules.xml Mon Oct 9 22:03:44 2006
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+
+<rules xmlns:xi="http://www.w3.org/2001/XInclude" xmlns="http://www.plone.org/deliverance">
+ <prepend theme="//head" content="//head/link" />
+ <prepend theme="//head" content="//head/style" />
+ <append theme="//head" content="//head/script" />
+ <append theme="//head" content="//head/meta" />
+ <append-or-replace theme="//head" content="//head/title" />
+</rules>
Added: z3/deliverance/branches/packaged/deliverance/test-data/nycsr/nycsr.theme
==============================================================================
--- (empty file)
+++ z3/deliverance/branches/packaged/deliverance/test-data/nycsr/nycsr.theme Mon Oct 9 22:03:44 2006
@@ -0,0 +1,7 @@
+
+<!-- helper file for doing hand transforms with this theme -->
+
+<blend
+ theme="http://www.nycsr.org"
+ baseurl="http://www.nycsr.org"
+ rules="./test-data/nycsr/nycsr.xml" />
Added: z3/deliverance/branches/packaged/deliverance/test-data/nycsr/nycsr.xml
==============================================================================
--- (empty file)
+++ z3/deliverance/branches/packaged/deliverance/test-data/nycsr/nycsr.xml Mon Oct 9 22:03:44 2006
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<rules xmlns:xi="http://www.w3.org/2001/XInclude" xmlns="http://www.plone.org/deliverance" >
+ <xi:include href="standardrules.xml" />
+
+ <copy theme="//div[@id='container']" content="//table[@id='portal-columns']" />
+</rules>
Added: z3/deliverance/branches/packaged/deliverance/test-data/nycsr/nycsr_expected.html
==============================================================================
--- (empty file)
+++ z3/deliverance/branches/packaged/deliverance/test-data/nycsr/nycsr_expected.html Mon Oct 9 22:03:44 2006
@@ -0,0 +1,409 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<style type="text/css"><!-- @import url(http://www.openplans.org/portal_css/Plone%20Default/ploneStyles3910.css); --></style>
+<style type="text/css"><!-- @import url(http://www.openplans.org/portal_css/Plone%20Default/ploneStyles7546.css); --></style>
+<style type="text/css"><!-- @import url(http://www.openplans.org/portal_css/Plone%20Default/ploneStyles3831.css); --></style>
+<link rel="alternate stylesheet" type="text/css" media="screen" href="http://www.openplans.org/portal_css/Plone%20Default/ploneStyles3993.css" title="Small Text">
+<link rel="alternate stylesheet" type="text/css" media="screen" href="http://www.openplans.org/portal_css/Plone%20Default/ploneStyles5069.css" title="Large Text">
+<link rel="alternate stylesheet" type="text/css" media="screen" href="http://www.openplans.org/portal_css/Plone%20Default/ploneStyles3656.css" title="Small Text">
+<link rel="alternate stylesheet" type="text/css" media="screen" href="http://www.openplans.org/portal_css/Plone%20Default/ploneStyles8929.css" title="Large Text">
+<link rel="shortcut icon" type="image/x-icon" href="http://www.openplans.org/favicon.ico">
+<link rel="home" href="http://www.openplans.org" title="Front page">
+<link rel="search" title="Search this site" href="http://www.openplans.org/search_form">
+<link rel="author" title="Author information" href="http://www.openplans.org/author/Jacqueline">
+<link rel="contents" href="http://www.openplans.org/sitemap" title="Site Map">
+<link rel="up" href="http://www.openplans.org/projects" title="Up one level">
+<meta name="author" content="New York City Streets Renaissance">
+<meta name="description" content="">
+<meta name="keywords" content="">
+<meta name="generator" content="BBEdit 8.2">
+<meta name="MSSmartTagsPreventParsing" content="true">
+<meta name="robots" content="all">
+<style type="text/css" media="screen">@import url(http://www.nycsr.org/css/style.css);</style>
+<style type="text/css" media="screen">@import url(http://www.nycsr.org/css/nav.css);</style>
+<script type="text/javascript"><!--//--><![CDATA[//><!--
+ startList = function() {
+ if (document.all&&document.getElementById) {
+ navRoot = document.getElementById("menu");
+ for (i=0; i<navRoot.childNodes.length; i++) {
+ node = navRoot.childNodes[i];
+ if (node.nodeName=="LI") {
+ node.onmouseover=function() {
+ this.className+=" over";
+ }
+ node.onmouseout=function() {
+ this.className=this.className.replace(" over", "");
+ }
+ }
+ }
+ }
+ }
+ window.onload=startList;
+
+ //--><!]]>
+ </script><script src="http://www.nycsr.org/js/gallery.js" type="text/javascript" language="javascript"></script><!-- image fade: http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm --><script type="text/javascript" src="http://www.openplans.org/projects/nycstreets/openplans.js"></script><script type="text/javascript" src="http://www.openplans.org/portal_javascripts/Plone%20Default/ploneScripts6565.js">
+ </script><script type="text/javascript" src="http://www.openplans.org/portal_javascripts/Plone%20Default/ploneScripts0569.js">
+ </script><meta name="generator" content="Plone - http://plone.org">
+<meta http-equiv="imagetoolbar" content="no">
+<title>
+ NYCSR
+ â
+ OpenPlans
+ </title>
+</head>
+<body id="page-home" class="index">
+<!-- Header --><div id="header"><h1 class="logo"><a href="http://www.nycsr.org/"><span>The New York City Streets Renaissance</span></a></h1></div>
+<!-- / Header --><hr>
+<script type="text/javascript"><!--//--><![CDATA[//><!--
+startList = function() {
+ if (document.all&&document.getElementById) {
+ navRoot = document.getElementById("menu");
+ for (i=0; i<navRoot.childNodes.length; i++) {
+ node = navRoot.childNodes[i];
+ if (node.nodeName=="LI") {
+ node.onmouseover=function() {
+ this.className+=" over";
+ }
+ node.onmouseout=function() {
+ this.className=this.className.replace(" over", "");
+ }
+ }
+ }
+ }
+}
+window.onload=startList;
+
+//--><!]]></script><!-- Top Level Links --><div id="toplevel"><ul class="links">
+<li id="top-home"><a href="http://www.nycsr.org/"><strong><span>Home Page</span></strong></a></li>
+<li id="top-join"><a href="http://www.nycsr.org/involved/join.php"><strong><span>Join Us</span></strong></a></li>
+</ul></div>
+<!-- / Top Level Links --><!-- Navigation Bar --><div id="nav">
+<ul id="menu" class="tabs">
+<li id="nav-who">
+<a href="http://www.nycsr.org/who/"><strong><span>Who We Are</span></strong></a><ul class="sub">
+<li><a href="http://www.nycsr.org/who/supporters.php"><span>Supporters List</span></a></li>
+<li><a href="http://www.nycsr.org/who/contact.php"><span>Contact Us</span></a></li>
+</ul>
+</li>
+<li id="nav-nyc">
+<a href="http://www.nycsr.org/nyc/"><strong><span>New York Streets</span></strong></a><ul class="sub">
+<li><a href="http://www.nycsr.org/nyc/truth.php"><span>The Truth About Traffic</span></a></li>
+<li><a href="http://www.nycsr.org/nyc/broken.php"><span>Broken Streets</span></a></li>
+<li><a href="http://www.nycsr.org/nyc/building.php"><span>Building on Progress</span></a></li>
+<li><a href="http://www.nycsr.org/nyc/video.php"><span>Video Gallery</span></a></li>
+<li><a href="http://www.nycsr.org/nyc/photo.php"><span>Photo Gallery</span></a></li>
+</ul>
+</li>
+<li id="nav-lessons">
+<a href="http://www.nycsr.org/lessons/"><strong><span>Global Lessons</span></strong></a><ul class="sub">
+<li><a href="http://www.nycsr.org/lessons/chicago.php"><span>Chicago</span></a></li>
+<li><a href="http://www.nycsr.org/lessons/philadelphia.php"><span>Philadelphia</span></a></li>
+<li><a href="http://www.nycsr.org/lessons/london.php"><span>London</span></a></li>
+<li><a href="http://www.nycsr.org/lessons/paris.php"><span>Paris</span></a></li>
+<li><a href="http://www.nycsr.org/lessons/copenhagen.php"><span>Copenhagen</span></a></li>
+<li><a href="http://www.nycsr.org/lessons/great.php"><span>What Makes a Great Street?</span></a></li>
+<li><a href="http://www.nycsr.org/lessons/benefits.php"><span>The Benefits of Great Streets</span></a></li>
+<li><a href="http://www.nycsr.org/lessons/photo.php"><span>Photo Gallery</span></a></li>
+</ul>
+</li>
+<li id="nav-involved">
+<a href="http://www.nycsr.org/involved/"><strong><span>Get Involved</span></strong></a><ul class="sub">
+<li><a href="http://www.nycsr.org/involved/join.php"><span>Join Us</span></a></li>
+<li><a href="http://www.nycsr.org/involved/ways.php"><span>Ways to Get Involved</span></a></li>
+<li><a href="http://www.nycsr.org/involved/resources.php"><span>Resources</span></a></li>
+</ul>
+</li>
+<li id="nav-events"><a href="http://www.nycsr.org/events/"><strong><span>Events</span></strong></a></li>
+</ul>
+<div class="clear"></div>
+</div>
+<!-- / Navigation Bar --><hr>
+<!-- Container --><div id="container"><table id="portal-columns"><tbody><tr>
+<td id="portal-column-content">
+
+
+ <div id="content" class="documentEditable">
+
+
+
+
+ <h5 class="hiddenStructure">Views</h5>
+
+ <ul class="contentViews">
+<li id="contentview-view" class="selected">
+ <a href="http://www.openplans.org/projects/nycstreets/project-home">View</a>
+ </li>
+
+
+
+ <li id="contentview-edit" class="plain">
+ <a href="http://www.openplans.org/projects/nycstreets/project-home/edit">Edit</a>
+ </li>
+
+
+ </ul>
+<div class="contentActions">
+
+
+
+
+
+
+
+
+
+
+
+ </div>
+
+
+ <div class="documentContent" id="region-content">
+
+ <a name="documentContent"></a>
+
+
+
+
+
+
+
+
+ <div class="documentActions">
+
+
+ <h5 class="hiddenStructure">Document Actions</h5>
+
+ <ul>
+<li>
+ <a href="http://www.openplans.org/projects/nycstreets/project-home/sendto_form">
+
+ <img src="http://www.openplans.org/mail_icon.gif" alt="Send this page to somebody" title="Send this page to somebody"></a>
+ </li>
+
+
+ <li>
+ <a href="javascript:this.print();">
+
+ <img src="http://www.openplans.org/print_icon.gif" alt="Print this page" title="Print this page"></a>
+ </li>
+
+
+
+ </ul>
+</div>
+
+ <h1 class="documentFirstHeading">NYCSR </h1>
+
+ <div>
+
+ <div class="documentByLine">
+
+
+
+
+ <span>
+ last modified
+ </span>
+
+ 2006-09-15 11:18
+
+
+
+
+
+
+
+
+
+ <div class="reviewHistory">
+
+</div>
+
+ </div>
+
+</div>
+
+
+
+
+
+ <div class="plain">
+ <h2 class="heading">
+<b>Welcome to the NYC Streets Renaissance Campaign Headquarters</b><br>
+</h2>
+<h3 class="subheading">The goal of the NYCSR is to tranform New York City streets so that they are safer, more productive and more livable. </h3>
+<p><img class="image-inline" src="http://www.openplans.org/projects/nycstreets/Sociable%20Men-1.jpg" height="200" width="314"><b><em>Streets can be places for neighbors to meet</em></b></p>
+<p>New York City is defined by its vibrant and diverse streets and neighborhoods. Unfortunately, our neighborhoods and business districts are buckling under increasing amounts of dangerous car and truck traffic. Children can no longer
+
+
+
+ <span class="wicked_resolved" id="text-860339cd275a35aed13ed4d80e8a8ff6">
+
+ <a href="http://www.openplans.org/projects/nycstreets/play-on-their-own-blocks">
+ <img src="http://www.openplans.org/projects/nycstreets/document_icon.gif"><span class="chunk">play on their own blocks</span>
+ </a>
+ </span>
+
+
+
+
+
+
+, while parents worry about turning cars smashing into baby carriages. Senior citizens are losing their independence, shut up in their homes for fear of crossing the street. And shoppers and investors are being turned away by chaotic, traffic-choked avenues. </p>
+<p>This is unacceptable. <strong>The time is long overdue for our great city to strike a better balance between traffic and the needs of pedestrians. </strong></p>
+<p>The <strong>NYC Streets Renaissance Campaign</strong> aims to: </p>
+<ul type="disc">
+<li>
+<b>Educate</b> New Yorkers about potential transportation policy changes that will improve quality of life across New York City</li>
+<li>
+<b>Promote</b> a rebalancing of this public space away from private vehicles and toward community needs</li>
+<li>
+<b>Demonstrate</b> the widespread public support for reform on these issues</li>
+<li>
+<b>Tap </b>the potential of New Yorkers to re-imagine their own streets</li>
+</ul>
+<p><strong></strong></p>
+<p><strong>Our Initiatives:</strong></p>
+<ul type="none">
+<li>Official launch with an <a title="MAS Exhibition Preparations" href="../mas/project-home" target="_self">exhibition</a>/event at the Municipal Arts Society</li>
+<li>Preparation of a multimedia information packet, including a <a title="inclusionletter" href="inclusionletter" target="_self">inclusion letter</a>, a dvd featuring <a title="TOPP: video production" href="../topp-video-production/project-home" target="_self">Clarence's work</a>, and a intro booklet</li>
+<li>Improvements <a title="website building" href="website-building" target="_self">requested</a> for the <a href="http://www.nycsr.org/" target="_self">nycstreets.org </a>homepage</li>
+<li>Host many <a title="Postcard Revised" href="../mas/mas-nycsr-postcard-revision-2.pdf" target="_self">events</a> to supplement our exhibition at the MAS.</li>
+<li>Promote and distribute
+
+
+
+ <span class="wicked_resolved" id="text-401890cd2f8c74f7d8106ecbddde78fe">
+
+ <a href="http://www.openplans.org/projects/nycstreets/studies-and-papers">
+ <img src="http://www.openplans.org/projects/nycstreets/document_icon.gif"><span class="chunk">studies and papers</span>
+ </a>
+ </span>
+
+
+
+
+
+
+ <a href="../studies-and-papers"></a>that dispel myths of streets and transit in NYC.</li>
+</ul>
+<p></p>
+<p></p>
+<ul type="none"><li>Help neighborhood leaders in the fight for long overdue, common sense improvements to their neighborhood streets</li></ul>
+<p></p>
+<p><strong></strong></p>
+<p><strong>To get involved</strong>, add your ideas for making New York City a better place to live and work to our Taking it Citywide
+
+
+
+ <span class="wicked_resolved" id="text-215018586e8c7cf5386a1bdcdae59e1a">
+ <a href="http://www.openplans.org/projects/nycstreets/neighborhoods">
+
+ <img src="http://www.openplans.org/projects/nycstreets/document_icon.gif"><span class="chunk">Neighborhoods</span>
+ </a>
+ </span>
+
+
+
+
+
+
+ page, or visit us at <a href="http://www.nycsr.org/involved.php">http://www.nycsr.org/involved.php</a> </p>
+<p></p>
+<p></p>
+<p></p>
+<p></p>
+<p><a title="old landing page" href="old-landing-page" target="_self">old landing page </a><br></p>
+<p><br></p>
+<p><strong>Together, we can re-imagine the streets of New York City.</strong></p>
+
+
+<!-- <p>Grand Street Before:<br /><img class="image-inline" src="http://www.openplans.org/projects/nycstreets/Grand_street_Before-1.jpg" height="237" width="501" /><br /></p><p></p><p>Grand Street Re-imaged as public space:</p><p><img class="image-inline" src="http://www.openplans.org/projects/nycstreets/Grand_street_AFTER-1.jpg" height="336" width="800" /></p> -->
+ </div>
+
+ <div class="visualClear"><!-- --></div>
+
+
+
+
+
+
+
+ <div id="relatedItems">
+
+
+
+
+
+</div>
+
+
+
+
+
+ <div class="discussion">
+
+
+
+
+
+
+
+</div>
+
+
+ </div>
+
+ </div>
+
+
+ </td>
+
+
+
+
+
+ </tr></tbody></table></div>
+<!-- / Container --><hr>
+<!-- Footer --><div id="footer">
+<p class="links">
+ [
+ <a href="http://www.nycsr.org/"><span>Home</span></a>
+ |
+ <a href="http://www.nycsr.org/who/"><span>Who We Are</span></a>
+ |
+ <a href="http://www.nycsr.org/nyc/"><span>New York Lessons</span></a>
+ |
+ <a href="http://www.nycsr.org/lessons/"><span>Global Lessons</span></a>
+ |
+ <a href="http://www.nycsr.org/involved/"><span>Get Involved</span></a>
+ |
+ <a href="http://www.nycsr.org/events/"><span>Events</span></a>
+ |
+ <a href="http://www.nycsr.org/involved/join.php"><span>Join Us</span></a>
+ ]
+ </p>
+<p class="cc"><a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.5/"><img alt="Creative Commons License" border="0" src="http://www.nycsr.org/img/logos/cc.png" class="logo"><br>
+ These works are licensed under a Creative Commons License
+ </a></p>
+<!--
+ <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+ <Work rdf:about="">
+ <license rdf:resource="http://creativecommons.org/licenses/by-nc-nd/2.5/" />
+ <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
+ </Work>
+ <License rdf:about="http://creativecommons.org/licenses/by-nc-nd/2.5/">
+ <permits rdf:resource="http://web.resource.org/cc/Reproduction"/>
+ <permits rdf:resource="http://web.resource.org/cc/Distribution"/>
+ <requires rdf:resource="http://web.resource.org/cc/Notice"/>
+ <requires rdf:resource="http://web.resource.org/cc/Attribution"/>
+ <prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/>
+ </License>
+ </rdf:RDF>
+ -->
+</div>
+<!-- / Footer -->
+</body>
+</html>
+
Added: z3/deliverance/branches/packaged/deliverance/test-data/nycsr/openplans.html
==============================================================================
--- (empty file)
+++ z3/deliverance/branches/packaged/deliverance/test-data/nycsr/openplans.html Mon Oct 9 22:03:44 2006
@@ -0,0 +1,648 @@
+
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+
+
+
+
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
+ lang="en">
+
+<head>
+ <meta http-equiv="Content-Type"
+ content="text/html;charset=utf-8" />
+
+ <title>
+ NYCSR
+ —
+ OpenPlans
+ </title>
+
+
+
+ <base href="http://www.openplans.org/projects/nycstreets/project-home/" />
+
+
+
+ <meta name="generator" content="Plone - http://plone.org" />
+
+
+
+
+ <!--//openplans JS add//-->
+ <script type="text/javascript" src="http://www.openplans.org/projects/nycstreets/openplans.js"></script>
+
+ <!-- Plone ECMAScripts -->
+
+
+
+ <script type="text/javascript"
+ src="http://www.openplans.org/portal_javascripts/Plone%20Default/ploneScripts6565.js">
+ </script>
+
+
+
+ <script type="text/javascript"
+ src="http://www.openplans.org/portal_javascripts/Plone%20Default/ploneScripts0569.js">
+ </script>
+
+
+
+
+
+
+
+
+
+
+
+ <style type="text/css"><!-- @import url(http://www.openplans.org/portal_css/Plone%20Default/ploneStyles3910.css); --></style>
+
+
+
+
+
+
+ <link rel="alternate stylesheet"
+ type="text/css" media="screen"
+ href="http://www.openplans.org/portal_css/Plone%20Default/ploneStyles3993.css"
+ title="Small Text" />
+
+
+
+
+
+
+ <link rel="alternate stylesheet"
+ type="text/css" media="screen"
+ href="http://www.openplans.org/portal_css/Plone%20Default/ploneStyles5069.css"
+ title="Large Text" />
+
+
+
+
+
+
+
+
+ <style type="text/css"><!-- @import url(http://www.openplans.org/portal_css/Plone%20Default/ploneStyles7546.css); --></style>
+
+
+
+
+
+
+
+ <link rel="alternate stylesheet"
+ type="text/css" media="screen"
+ href="http://www.openplans.org/portal_css/Plone%20Default/ploneStyles3656.css"
+ title="Small Text" />
+
+
+
+
+
+
+ <link rel="alternate stylesheet"
+ type="text/css" media="screen"
+ href="http://www.openplans.org/portal_css/Plone%20Default/ploneStyles8929.css"
+ title="Large Text" />
+
+
+
+
+
+
+
+
+ <style type="text/css"><!-- @import url(http://www.openplans.org/portal_css/Plone%20Default/ploneStyles3831.css); --></style>
+
+
+
+
+
+
+
+ <!-- Internet Explorer CSS Fixes + IE7 for compliance fixes (limited set) -->
+ <!--[if lt IE 7]>
+ <style type="text/css" media="all">@import url(http://www.openplans.org/IEFixes.css);</style>
+ <![endif]-->
+
+ <link rel="shortcut icon" type="image/x-icon"
+ href="http://www.openplans.org/favicon.ico" />
+
+ <!-- Put this inside iefixstart to apply the IE7 script. It will be very slow, and currently
+ breaks with plonePrint.css and plonePresentation.css for unknown reasons.
+ <script src="ie7-standard.js" type="text/javascript" tal:attributes="src string:$portal_url/ie7/ie7-standard.js"></script>
+ -->
+
+
+ <link rel="home" href="http://www.openplans.org"
+ title="Front page" />
+ <link rel="search" title="Search this site"
+ href="http://www.openplans.org/search_form" />
+ <link rel="author" title="Author information"
+ href="http://www.openplans.org/author/Jacqueline" />
+ <link rel="contents"
+ href="http://www.openplans.org/sitemap"
+ title="Site Map" />
+
+
+
+
+
+ <link rel="up" href="http://www.openplans.org/projects"
+ title="Up one level" />
+
+
+
+ <!-- Disable IE6 image toolbar -->
+ <meta http-equiv="imagetoolbar" content="no" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ </head>
+
+<body class="section-projects" dir="ltr">
+
+ <div id="visual-portal-wrapper">
+
+ <table id="tablemain">
+ <tbody>
+ <tr>
+ <td id="topleftshadow_out"><div class="fill"></div></td>
+ <td id="topshadow"><div id="topleftshadow_in"></div><div id="toprightshadow_in"></div></td>
+
+ <td id="toprightshadow_out"><div class="fill"></div></td>
+ </tr>
+
+ <tr>
+ <td rowspan="3" id="leftshadow"><div class="fill"></div></td>
+ <td id="headerrow">
+ <div id="portal-top">
+ <div id="portal-header">
+ <a class="hiddenStructure" accesskey="2"
+ href="http://www.openplans.org/projects/projects/nycstreets/project-home#documentContent">Skip to content</a>
+
+ <a class="hiddenStructure" accesskey="6"
+ href="http://www.openplans.org/projects/projects/nycstreets/project-home#portlet-navigation-tree">Skip to navigation</a>
+
+ <div style="float:left; clear:both; width: 100%">
+
+ <!-- div metal:use-macro="here/global_skinswitcher/macros/skin_tabs">
+ The skin switcher tabs. Based on which role you have, you
+ get a selection of skins that you can switch between.
+
+ </div -->
+
+ <h1 id="portal-logo">
+ <a href="http://www.openplans.org" accesskey="1">OpenPlans</a>
+</h1>
+
+
+ <!-- h5 class="hiddenStructure" i18n:translate="heading_sections">Sections</h5 -->
+ <div id="navwrap">
+ <ul id="portal-globalnav">
+
+ <li id="portaltab-people" class="plain">
+ <a href="http://www.openplans.org/people">People</a>
+ </li>
+
+
+ <li id="portaltab-projects" class="selected">
+ <a href="http://www.openplans.org/projects">Projects</a>
+
+ </li>
+
+ </ul>
+ </div>
+
+ <!--//old links for reference
+
+
+ <li><a href="#">OpenPlans home |</a></li>
+ <li><a href="#">My Projects or Login |</a></li>
+ <li><a href="#">Logout (only if My Projects is on</a></li>
+ <li id="ts-startproject"><a href="#">Start a Project</a></li>
+ </ul>
+ //-->
+
+
+ <div id="portal-searchbox">
+ <form name="searchform"
+ action="http://www.openplans.org/search"
+ style="white-space:nowrap"
+ onsubmit="return liveSearchSubmit()">
+
+ <label for="searchGadget" class="hiddenStructure">Search Site</label>
+
+ <div class="LSBox">
+ <input id="searchGadget" tabindex="30001"
+ name="SearchableText" type="text" size="15"
+ title="Search Site" accesskey="4"
+ class="visibility:visible" />
+
+ <input class="searchButton" type="submit"
+ tabindex="30002" value="Search" />
+
+ <div class="LSResult" id="LSResult" style=""><div class="LSShadow" id="LSShadow"></div></div>
+ </div>
+ </form>
+
+ <div id="portal-advanced-search" class="hiddenStructure">
+
+ <a href="http://www.openplans.org/search_form"
+ accesskey="5">
+ Advanced Search…
+ </a>
+ </div>
+
+</div>
+ </div>
+ </div>
+ </div>
+
+ </td>
+ <td rowspan="3" id="rightshadow"><div class="fill"></div></td>
+ </tr>
+ <tr>
+ <td id="bannerrow">
+ <div id="banner_header">
+
+ <div id="portal-bannerheader">
+ <table id="ts_bannerheader">
+
+ <tr>
+ <td id="ts-titleheadercol">
+ <div id="ts-titleheader">
+
+ <a href="http://www.openplans.org/projects/nycstreets">
+ <h1>New York City Streets Renaissance Campaign</h1>
+ </a>
+
+
+ </div>
+ </td>
+
+ <td id="project-tabs">
+ <div>
+ <ul condition="inProject">
+
+ <li>
+ <a href="http://www.openplans.org/projects/nycstreets/contact_project_admins"
+ id="project_tabs-get-involved">Get Involved!</a>
+ </li>
+
+ </ul>
+
+ </div>
+
+ </td>
+ <td id="ts_imagecol"><div id="ts_image"></div></td>
+ </tr>
+ </table>
+</div>
+
+
+ </div>
+
+ <!--//
+ <h5 class="hiddenStructure" i18n:translate="heading_personal_tools">Personal tools</h5>//-->
+ <div id="portal-navigation-personal">
+
+ <div id="portal-personaltools">
+ <ul>
+
+
+ <li>
+ <a href="http://www.openplans.org/login_form">
+ Log in
+ </a>
+ </li>
+
+
+ <li>
+ <a href="http://www.openplans.org/createMember">
+ Join
+ </a>
+
+ </li>
+
+ </ul></div>
+
+
+ <div id="portal-breadcrumbs">
+
+
+ <ul>
+ <li>
+ <a href="http://www.openplans.org/projects/nycstreets/">Project Home</a>
+ </li>
+ <li>
+
+ <a href="http://www.openplans.org/projects/nycstreets/proj_roster">Project Roster</a>
+ </li>
+ </ul>
+
+ </div>
+
+ </div>
+
+ </td>
+ </tr>
+
+ <!--// table row for main content
+ THIS NEVER CHANGES//-->
+ <tr>
+ <td>
+ <div class="visualClear"><!-- --></div>
+
+
+ <table id="portal-columns">
+ <tbody>
+ <tr>
+
+
+
+
+
+ <td id="portal-column-content">
+
+
+ <div id="content"
+ class="documentEditable">
+
+
+
+
+ <h5 class="hiddenStructure">Views</h5>
+
+ <ul class="contentViews">
+
+
+ <li id="contentview-view" class="selected">
+ <a href="http://www.openplans.org/projects/nycstreets/project-home">View</a>
+ </li>
+
+
+
+ <li id="contentview-edit" class="plain">
+ <a href="http://www.openplans.org/projects/nycstreets/project-home/edit">Edit</a>
+ </li>
+
+
+ </ul>
+
+
+
+ <div class="contentActions">
+
+
+
+
+
+
+
+
+
+
+
+ </div>
+
+
+ <div class="documentContent" id="region-content">
+
+ <a name="documentContent"></a>
+
+
+
+
+
+
+
+
+ <div class="documentActions">
+
+
+ <h5 class="hiddenStructure">Document Actions</h5>
+
+ <ul>
+
+ <li>
+ <a href="http://www.openplans.org/projects/nycstreets/project-home/sendto_form">
+
+ <img src="http://www.openplans.org/mail_icon.gif"
+ alt="Send this page to somebody"
+ title="Send this page to somebody" />
+ </a>
+ </li>
+
+
+ <li>
+ <a href="javascript:this.print();">
+
+ <img src="http://www.openplans.org/print_icon.gif"
+ alt="Print this page"
+ title="Print this page" />
+ </a>
+ </li>
+
+
+
+ </ul>
+
+
+
+
+</div>
+
+ <h1 class="documentFirstHeading">NYCSR </h1>
+
+ <div>
+
+ <div class="documentByLine">
+
+
+
+
+ <span>
+ last modified
+ </span>
+
+ 2006-09-15 11:18
+
+
+
+
+
+
+
+
+
+ <div class="reviewHistory">
+
+</div>
+
+ </div>
+
+</div>
+
+
+
+
+
+ <div class="plain">
+ <h2 class="heading"><b>Welcome to the NYC Streets Renaissance Campaign Headquarters</b><br /></h2><h3 class="subheading">The goal of the NYCSR is to tranform New York City streets so that they are safer, more productive and more livable. </h3><p><img class="image-inline" src="http://www.openplans.org/projects/nycstreets/Sociable%20Men-1.jpg" height="200" width="314" /> <b><em>Streets can be places for neighbors to meet</em></b></p><p>New York City is defined by its vibrant and diverse streets and neighborhoods. Unfortunately, our neighborhoods and business districts are buckling under increasing amounts of dangerous car and truck traffic. Children can no longer
+
+
+
+ <span class="wicked_resolved"
+ id="text-860339cd275a35aed13ed4d80e8a8ff6">
+
+ <a href="http://www.openplans.org/projects/nycstreets/play-on-their-own-blocks">
+ <img src="http://www.openplans.org/projects/nycstreets/document_icon.gif" /><span
+ class="chunk">play on their own blocks</span>
+ </a>
+ </span>
+
+
+
+
+
+
+, while parents worry about turning cars smashing into baby carriages. Senior citizens are losing their independence, shut up in their homes for fear of crossing the street. And shoppers and investors are being turned away by chaotic, traffic-choked avenues. </p><p>This is unacceptable. <strong>The time is long overdue for our great city to strike a better balance between traffic and the needs of pedestrians. </strong></p><p>The <strong>NYC Streets Renaissance Campaign</strong> aims to: </p><ul type="disc"><li><b>Educate</b> New Yorkers about potential transportation policy changes that will improve quality of life across New York City</li><li><b>Promote</b> a rebalancing of this public space away from private vehicles and toward community needs</li><li><b>Demonstrate</b> the widespread public support for reform on these issues</li><li><b>Tap </b>the potential of New Yorkers to re-imagine their own streets</li></ul><p><strong></strong></p><p><strong>Our Initiatives:</strong></p><ul type="none"><li>Official launch with an <a title="MAS Exhibition Preparations" href="../mas/project-home" target="_self">exhibition</a>/event at the Municipal Arts Society</li><li>Preparation of a multimedia information packet, including a <a title="inclusionletter" href="inclusionletter" target="_self">inclusion letter</a>, a dvd featuring <a title="TOPP: video production" href="../topp-video-production/project-home" target="_self">Clarence's work</a>, and a intro booklet</li><li>Improvements <a title="website building" href="website-building" target="_self">requested</a> for the <a href="http://www.nycsr.org/" target="_self">nycstreets.org </a>homepage</li><li>Host many <a title="Postcard Revised" href="../mas/mas-nycsr-postcard-revision-2.pdf" target="_self">events</a> to supplement our exhibition at the MAS.</li><li>Promote and distribute
+
+
+
+ <span class="wicked_resolved"
+ id="text-401890cd2f8c74f7d8106ecbddde78fe">
+
+ <a href="http://www.openplans.org/projects/nycstreets/studies-and-papers">
+ <img src="http://www.openplans.org/projects/nycstreets/document_icon.gif" /><span
+ class="chunk">studies and papers</span>
+ </a>
+ </span>
+
+
+
+
+
+
+ <a href="../studies-and-papers"></a>that dispel myths of streets and transit in NYC.</li></ul><p></p><p></p><ul type="none"><li>Help neighborhood leaders in the fight for long overdue, common sense improvements to their neighborhood streets</li></ul><p></p><p><strong></strong></p><p><strong>To get involved</strong>, add your ideas for making New York City a better place to live and work to our Taking it Citywide
+
+
+
+ <span class="wicked_resolved"
+ id="text-215018586e8c7cf5386a1bdcdae59e1a">
+ <a href="http://www.openplans.org/projects/nycstreets/neighborhoods">
+
+ <img src="http://www.openplans.org/projects/nycstreets/document_icon.gif" /><span
+ class="chunk">Neighborhoods</span>
+ </a>
+ </span>
+
+
+
+
+
+
+ page, or visit us at <a href="http://www.nycsr.org/involved.php">http://www.nycsr.org/involved.php</a> </p><p></p><p></p><p></p><p></p><p><a title="old landing page" href="old-landing-page" target="_self">old landing page </a><br /></p><p><br /></p><p><strong>Together, we can re-imagine the streets of New York City.</strong></p>
+
+
+<!-- <p>Grand Street Before:<br /><img class="image-inline" src="http://www.openplans.org/projects/nycstreets/Grand_street_Before-1.jpg" height="237" width="501" /><br /></p><p></p><p>Grand Street Re-imaged as public space:</p><p><img class="image-inline" src="http://www.openplans.org/projects/nycstreets/Grand_street_AFTER-1.jpg" height="336" width="800" /></p> -->
+ </div>
+
+ <div class="visualClear"><!-- --></div>
+
+
+
+
+
+
+
+ <div id="relatedItems">
+
+
+
+
+
+</div>
+
+
+
+
+
+ <div class="discussion">
+
+
+
+
+
+
+
+</div>
+
+
+ </div>
+
+ </div>
+
+
+ </td>
+
+
+
+
+
+ </tr>
+ </tbody>
+ </table>
+
+ </td>
+ </tr>
+
+ <tr>
+ <td id="bottomleftshadow_out"><div class="fill"></div></td>
+
+ <td id="bottomshadow"><div id="bottomleftshadow_in"></div><div id="bottomrightshadow_in"></div></td>
+ <td id="bottomrightshadow_out"><div class="fill"></div></td>
+ </tr>
+
+ </tbody>
+ </table>
+ </div>
+
+ <div class="visualClear"><!-- --></div>
+
+</body>
+</html>
+
+
Added: z3/deliverance/branches/packaged/deliverance/test-data/nycsr/standardrules.xml
==============================================================================
--- (empty file)
+++ z3/deliverance/branches/packaged/deliverance/test-data/nycsr/standardrules.xml Mon Oct 9 22:03:44 2006
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+
+<rules xmlns:xi="