{ "info": { "author": "Sean Kelly", "author_email": "kelly@seankelly.biz", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Environment :: Console", "Framework :: Buildout", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Build Tools", "Topic :: Text Processing :: Markup :: XML" ], "description": "*************\nsk.recipe.xdv\n*************\n\nThis is a Buildout_ recipe that automates compilation of XDV_ rules and theme\nfiles into XSLT_ for use with transformation-capable web servers.\n\n\nIntroduction\n============\n\nDeliverance_ is a \"game-changing\" concept in the assembly and theming of\ndisparate web applications into singular, cohesive units. XDV_ is an\nimplementation of a subset of Deliverance that generates pure Extensible\nStylesheet Language (XSL_) Transformation (XSLT_) rules. Buildout_ is a\ncivilized way of constructing of applications in repeatable a manner, driven\nby \"recipes\" that tell how to attain specific goals.\n\nThis recipe, ``sk.recipe.xdv``, enables a Buildout to automatically construct\nthe XSLT output of XDV from its source rules and theme.\n\n\nDeveloper's Information\n=======================\n\nProject home page\n http://code.google.com/p/buildout-recipes/\nSource repository\n http://buildout-recipes.googlecode.com/svn/recipes/sk.recipe.xdv\nIssue tracker\n http://code.google.com/p/buildout-recipes/issues/list\n\n\n.. References:\n.. _Buildout: http://www.buildout.org/\n.. _Deliverance: http://deliveranceproject.org/\n.. _XDV: http://pypi.python.org/pypi/xdv\n.. _XSL: http://www.w3.org/Style/XSL/\n.. _XSLT: http://www.w3.org/TR/xslt\n\n\nInstallation\n============\n\nSince this is a Buildout recipe, there's nothing really to install. Just\nmention the recipe name in a buildout and enjoy! For example, your\n``buildout.cfg`` might be something like this::\n\n [buildout]\n parts =\n my-webserver\n my-cms\n my-theme\n web-config\n ...\n [my-theme]\n recipe = sk.recipe.xdv\n rules = ${buildout:directory}/etc/rules.xml\n theme = ${buildout:directory}/src/skin/main-template.html\n [web-config]\n recipe = collective.recipe.template\n input = ${buildout:directory}/etc/httpd.conf.template\n output = ${buildout:directory}/etc/httpd.conf\n ...\n\nThen, assuming ``httpd.conf.template`` contains ``${my-theme:output}``, the\ngenerated ``httpd.conf`` will contain the path to the compiled XSLT file.\n\nEasy!\n\n\n\nSupported Options\n=================\n\nThe ``sk.recipe.xdv`` recipe supports the following options:\n\n``rules``\n (Required.) The rules XML file to compile.\n``theme``\n (Required.) The theme HTML file to use as a template.\n``output``\n (Optional.) Where to write the XSLT file as a result of compilation.\n If not given, the recipe will create a subdirectory in the Buildout's\n ``parts`` directory named after the part in the buildout\n configuration, and will create the compiled XSLT in that directory\n named ``theme.xsl``.\n``includemode``\n (Optional.) Tells how to de-reference content included by the rules,\n defaults to ``document``. In ``document`` mode, included content is\n inserted via the XSLT ``document()`` function. In ``ssi`` mode, it's\n by server-side include (and requires a compatible webserver). In\n ``esi`` mode, it's by edge-side include (and requires a compatible\n cache server).\n``network``\n (Optional.) Tells if it's OK to access the network in order to resolve\n entities (fetch resources); specify either ``true`` or ``false``.\n Defaults to false if the Buildout itself is running in offline mode.\n\nIf you don't specify the ``output`` option, then this recipe sets it to the\npath of the generated theme XSLT file. You can then use that value in other\nparts of the buildout with ``${part-name:output}`` where ``part-name`` is the\nname of the part that used the ``sk.recipe.xdv`` recipe.\n\n\nExample Usage\n=============\n\nFor this demonstration, we have pre-prepared rules and template files named\n``rules.xml`` and ``theme.html`` in the ``testdata`` subdirectory. Let's grab\nsome convenient references to these files::\n\n >>> import os.path\n >>> testdata = join(os.path.dirname(__file__), 'testdata')\n >>> rulesXML = join(testdata, 'rules.xml')\n >>> themeHTML = join(testdata, 'theme.html')\n\nNow let's make a buildout that compiles those rules and theme template::\n\n >>> write(sample_buildout, 'buildout.cfg', '''\n ... [buildout]\n ... parts = my-rules\n ...\n ... [my-rules]\n ... recipe = sk.recipe.xdv\n ... rules = %(rules)s\n ... theme = %(theme)s\n ... ''' % dict(rules=rulesXML, theme=themeHTML))\n\nWe list the two required settings, ``rules`` and ``theme``, and let Buildout\ndo its thing::\n\n >>> print system(buildout)\n Installing my-rules.\n\nSince we left every other option at the defaults, the recipe compiled the\nrules and template theme into a file named ``theme.xsl`` and stuck it in a\nsubdirectory of the Buildout's parts directory named ``my-rules``, which\nyou'll notice is the name of the part in the ``buildout.cfg`` file::\n\n >>> ls('parts', 'my-rules')\n - theme.xsl\n\nWhat's it look like? Let's check::\n\n >>> cat('parts', 'my-rules', 'theme.xsl') # doctest: +ELLIPSIS\n >> destDir = tmpdir('my-dir')\n >>> destXSL = join(destDir, 'my-output.xsl')\n >>> write(sample_buildout, 'buildout.cfg', '''\n ... [buildout]\n ... parts = my-rules\n ...\n ... [my-rules]\n ... recipe = sk.recipe.xdv\n ... output = %(destination)s\n ... rules = %(rules)s\n ... theme = %(theme)s\n ... ''' % dict(destination=destXSL, rules=rulesXML, theme=themeHTML))\n\nRe-running the Buildout::\n\n >>> print system(buildout)\n Uninstalling my-rules.\n Installing my-rules.\n\nAnd now look what showed up in our working directory::\n\n >>> ls(destDir)\n - my-output.xsl\n \nPerfect.\n\n\nControlling 3rd-Party Entity Inclusion\n--------------------------------------\n\nXDV normally generates XSLT that translates content from an underlying\nproduction system into the desired theme by applying the rules. However,\ncontent can also come from 3rd-party resources that are not part of the\ncurrent resource stream. If you don't tell in the rules file how to retrieve\nthem, then a default resource method will be used. You can specify what that\ndefault method should be using the ``includemode`` option.\n\nUnless otherwise stated, the include mode uses the XSLT ``document`` function.\nYou can be explicit about that by stating ``document`` in the recipe's part::\n\n [my-rules]\n recipe = sk.recipe.xdv\n includemode = document\n ...\n \nOther include modes are ``ssi`` to use server-side includes and ``esi`` to use\nedge-side includes. Let's give one of these a try. First, let's update the\n``buildout.cfg``:\n\n >>> destDir = tmpdir('another-dir')\n >>> docBased = join(destDir, 'doc-based.xsl')\n >>> ssiBased = join(destDir, 'ssi-based.xsl')\n >>> write(sample_buildout, 'buildout.cfg', '''\n ... [buildout]\n ... parts =\n ... doc-based\n ... ssi-based\n ...\n ... [doc-based]\n ... recipe = sk.recipe.xdv\n ... includemode = document\n ... output = %(docBased)s\n ... rules = %(rules)s\n ... theme = %(theme)s\n ...\n ... [ssi-based]\n ... recipe = sk.recipe.xdv\n ... includemode = ssi\n ... output = %(ssiBased)s\n ... rules = %(rules)s\n ... theme = %(theme)s\n ... ''' % dict(docBased=docBased, ssiBased=ssiBased, rules=rulesXML, theme=themeHTML))\n\nNow let's run the Buildout and see how the output differs::\n\n >>> print system(buildout)\n Uninstalling my-rules.\n Installing doc-based.\n Installing ssi-based.\n\nAnd now look what showed up in our working directory::\n\n >>> ls(destDir)\n - doc-based.xsl\n - ssi-based.xsl\n >>> cat(docBased) # doctest: +ELLIPSIS\n >> cat(ssiBased) # doctest: +ELLIPSIS\n # include virtual=\"/legal.html...\n\nESI works similarly (if it really works at all; testing it this morning gives\nme errors from the XDV compiler).\n\n\nChangelog\n=========\n\n0.0.0\n-----\n\nThis release is destined to become the eventual GA_ release.\n\n\n.. References:\n.. _GA: http://en.wikipedia.org/wiki/Development_stage#General_availability_.28GA.29", "description_content_type": null, "docs_url": null, "download_url": "http://code.google.com/p/buildout-recipes/downloads/list", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://code.google.com/p/buildout-recipes/", "keywords": "buildout xdv deliverance compiler xsl xslt", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "sk.recipe.xdv", "package_url": "https://pypi.org/project/sk.recipe.xdv/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/sk.recipe.xdv/", "project_urls": { "Download": "http://code.google.com/p/buildout-recipes/downloads/list", "Homepage": "http://code.google.com/p/buildout-recipes/" }, "release_url": "https://pypi.org/project/sk.recipe.xdv/0.0.0/", "requires_dist": null, "requires_python": null, "summary": "A recipe for Buildout (zc.buildout) to compile XDV rules into XSLT", "version": "0.0.0" }, "last_serial": 177112, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "42a045951d3be383cfeca674f18c6b60", "sha256": "1f06fc258266e0e7329c820bb015b6d1c9f7f3b6efed1318355b389ea4b62f36" }, "downloads": -1, "filename": "sk.recipe.xdv-0.0.0-py2.4.egg", "has_sig": false, "md5_digest": "42a045951d3be383cfeca674f18c6b60", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 14575, "upload_time": "2010-05-29T23:44:04", "url": "https://files.pythonhosted.org/packages/5a/d4/ca05d94a11bab89fe57ad567643c58f144dbe404826abaeee4de061f32b8/sk.recipe.xdv-0.0.0-py2.4.egg" }, { "comment_text": "", "digests": { "md5": "2282c95d5777afea876ac4230acf61ba", "sha256": "02e94c99376627e9e6e40b7cb79d57d99b17e8094c7df547565251825b59e35b" }, "downloads": -1, "filename": "sk.recipe.xdv-0.0.0-py2.5.egg", "has_sig": false, "md5_digest": "2282c95d5777afea876ac4230acf61ba", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 14606, "upload_time": "2010-05-29T23:43:58", "url": "https://files.pythonhosted.org/packages/81/b6/aa981160142d36ed17d002fd7b88ee7fa8a9c2ca33a8de0ef0596a7416ea/sk.recipe.xdv-0.0.0-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "42de53f7020c8f23163b00a1fbfba959", "sha256": "441d8f36beb7378d96e8b1daf38c4ce46391a8f58fc2205b8b251d506a0091ae" }, "downloads": -1, "filename": "sk.recipe.xdv-0.0.0-py2.6.egg", "has_sig": false, "md5_digest": "42de53f7020c8f23163b00a1fbfba959", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 14604, "upload_time": "2010-05-29T23:43:41", "url": "https://files.pythonhosted.org/packages/69/35/3982950fb02e940dabbe3be90a02a3092654e4919a4482821c5ed1d15629/sk.recipe.xdv-0.0.0-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "60a394561f972c496167cdde4f8d37c6", "sha256": "01fe1b56c2cf958bdc473e1ed901a3bb2524cc40d804897c9d74f8ae126c770c" }, "downloads": -1, "filename": "sk.recipe.xdv-0.0.0.tar.gz", "has_sig": false, "md5_digest": "60a394561f972c496167cdde4f8d37c6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8628, "upload_time": "2010-05-29T23:43:40", "url": "https://files.pythonhosted.org/packages/18/11/19d9969e38ac0fe0d2957befa3a18808c7b0ef102d7fc719e64ef52a0d64/sk.recipe.xdv-0.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "42a045951d3be383cfeca674f18c6b60", "sha256": "1f06fc258266e0e7329c820bb015b6d1c9f7f3b6efed1318355b389ea4b62f36" }, "downloads": -1, "filename": "sk.recipe.xdv-0.0.0-py2.4.egg", "has_sig": false, "md5_digest": "42a045951d3be383cfeca674f18c6b60", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 14575, "upload_time": "2010-05-29T23:44:04", "url": "https://files.pythonhosted.org/packages/5a/d4/ca05d94a11bab89fe57ad567643c58f144dbe404826abaeee4de061f32b8/sk.recipe.xdv-0.0.0-py2.4.egg" }, { "comment_text": "", "digests": { "md5": "2282c95d5777afea876ac4230acf61ba", "sha256": "02e94c99376627e9e6e40b7cb79d57d99b17e8094c7df547565251825b59e35b" }, "downloads": -1, "filename": "sk.recipe.xdv-0.0.0-py2.5.egg", "has_sig": false, "md5_digest": "2282c95d5777afea876ac4230acf61ba", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 14606, "upload_time": "2010-05-29T23:43:58", "url": "https://files.pythonhosted.org/packages/81/b6/aa981160142d36ed17d002fd7b88ee7fa8a9c2ca33a8de0ef0596a7416ea/sk.recipe.xdv-0.0.0-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "42de53f7020c8f23163b00a1fbfba959", "sha256": "441d8f36beb7378d96e8b1daf38c4ce46391a8f58fc2205b8b251d506a0091ae" }, "downloads": -1, "filename": "sk.recipe.xdv-0.0.0-py2.6.egg", "has_sig": false, "md5_digest": "42de53f7020c8f23163b00a1fbfba959", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 14604, "upload_time": "2010-05-29T23:43:41", "url": "https://files.pythonhosted.org/packages/69/35/3982950fb02e940dabbe3be90a02a3092654e4919a4482821c5ed1d15629/sk.recipe.xdv-0.0.0-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "60a394561f972c496167cdde4f8d37c6", "sha256": "01fe1b56c2cf958bdc473e1ed901a3bb2524cc40d804897c9d74f8ae126c770c" }, "downloads": -1, "filename": "sk.recipe.xdv-0.0.0.tar.gz", "has_sig": false, "md5_digest": "60a394561f972c496167cdde4f8d37c6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8628, "upload_time": "2010-05-29T23:43:40", "url": "https://files.pythonhosted.org/packages/18/11/19d9969e38ac0fe0d2957befa3a18808c7b0ef102d7fc719e64ef52a0d64/sk.recipe.xdv-0.0.0.tar.gz" } ] }