{ "info": { "author": "Fr\u00e9d\u00e9ric BISSON", "author_email": "zigazou@free.fr", "bugtrack_url": null, "classifiers": [], "description": "==========\nXSLClearer\n==========\n\nXSLClearer tries to make writing XSL templates easier.\n\nIt is a proof of concept. It is therefore in early stage of development.\nThough it works on a simple example, it will surely fail at more concrete\ncase.\n\nIt is in fact a very crude compiler (lexical+grammar).\n\nDocumentation\n=============\n\nTags\n----\n\nThe xsls format converts:\n\n tag(attribute=\"value\", attribute=\"value\") {\n tag(attribute=\"value\", attribute=\"value\");\n tag();\n\n tag(attribute=\"value\") {\n [Hello]\n }\n }\n\ninto\n\n \n \n \n \n \n Hello\n \n \n\nXSLClearer recognizes tags and attributes up to XSLT 3.0. A tag/attribute\nwithout a preceding namespace must be and XSLT 3.0 or XSLT-FO tag/attribute.\nIt otherwise throw an error. If there is a preceding namespace, no check is\ndone.\n\nIf you need to use a closing bracket inside the [ ], you may escape it using\nthe back-slash.\n\nIf you need to use a double quote inside the \" \", you may escape it using\nthe back-slash.\n\nVariables\n---------\n\nThe xsls format converts:\n\n $variable = \"string\";\n\ninto\n\n \n \nThe xsls format converts:\n\n $variable = {\n instructions\n }\n\ninto\n\n \n instructions\n \n\nStrings\n-------\n\nStrings are enclosed with double quotes (\"). It accepts \\ as an escaping\ncharacter (\\\\ to insert \\, \\\" to insert \" inside a string).\n\nSpecial XML characters are automatically escaped.\n\nExample:\n\n \"string-length(\\\"abc\\\") > 2\"\n\ntranslates into:\n\n \"string-length("abc") > 2\"\n\nCSS selector strings\n--------------------\n\nStrings can contain CSS selector if they are directly preceded by a #.\n\nExample:\n\n #\"ns|tag ns|tag#identifier\"\n\ntranslates into:\n\n \"//ns:tag//ns:tag[@id='identifier']\"\n\nIt uses the **cssselect** Python module to do the conversion.\n\nIf this module is missing, xslclearer raises an exception.\n\nTags with only one attribute\n----------------------------\n\nThe xsls format converts:\n\n call-template(\"string\") {\n instructions\n }\n\ninto\n\n \n instructions\n \n\nIt works for the following tags (attribute):\n\n* when (test),\n* if (test),\n* for-each (select),\n* call-template (name),\n* include (href),\n* import (href),\n* copy (use-attribute-sets),\n* copy-of (select),\n* message (terminate),\n* preserve-space (elements),\n* strip-space (elements),\n* text (disable-output-escaping).\n\nThough they may have more than one attribute, it also works for the following\ntags (attribute):\n\n* value-of (select),\n* apply-templates (select),\n* template (name),\n* attribute (name).\n\nIn this case, the argument must be given at the very first position.\n\nExample:\n\n template(\"template-name\", match=\"*\") {\n ...\n }\n\ntranslates into:\n\n \n ...\n \n\nTag and attribute verification\n------------------------------\n\nThe compiler verifies that identifiers are from the XSL or XSL-FO tags lists.\nSpecifying a namespace disables the verification.\n\nThe verification alsa applies to the attributes.\n\nInstall\n=======\n\nJust place the xslclearer.py in a directory pointed to by the PATH variable\nenvironment, make it executable and that\u2019s all !\n\nIf you want syntax highlighting in gedit, you can copy the xsls.lang file to\nthe /usr/share/gtksourceview-3.0/language-specs directory (adjust it\naccordingly to your configuration).\n\nRequirements\n============\n\nXSLClearer has been developped with Python 3.\n\nIt only requires the re and sys modules.\n\nUsage\n=====\n\n python3 xslclearer.py input.xsls > output.xslt\n \n cat input.xsls | python3 xslclearer.py > output.xslt\n\n xslsproc style.xsls input.xml > output\n\nThe xslsproc is a wrapper for the xsltproc command. It analyzes the options to\nfind the an xsls file. If it can be found, the file is transparently converted\nto an xslt stylesheet and feed to xsltproc. Every other option is passed\nwithout any change. You can therefore use xslsproc exactly like you would use\nxsltproc except it understands xsls files and not xslt files.\n\nExample\n=======\n\nThe example directory contains an example of an XSL template converted to XSLS\nand a file called menu.xml on which the template works.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/XSLClearer/", "keywords": null, "license": "COPYING", "maintainer": null, "maintainer_email": null, "name": "XSLClearer", "package_url": "https://pypi.org/project/XSLClearer/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/XSLClearer/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/XSLClearer/" }, "release_url": "https://pypi.org/project/XSLClearer/0.1.3/", "requires_dist": null, "requires_python": null, "summary": "XSLClearer makes writing XSL template easier to write.", "version": "0.1.3" }, "last_serial": 1121139, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "a8302cd3d1d7bb114b81b71365725ef4", "sha256": "555c9e565234fd2f5365eb4665f228736dcf911459af514128fba6e44a7d039f" }, "downloads": -1, "filename": "XSLClearer-0.1.0.tar.gz", "has_sig": false, "md5_digest": "a8302cd3d1d7bb114b81b71365725ef4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10092, "upload_time": "2014-05-28T20:11:24", "url": "https://files.pythonhosted.org/packages/51/82/e77fe294ede28373f1144669e07d50f595c826914f438d78dd35da417164/XSLClearer-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "50543543fed2d6e2706d3ffb640decae", "sha256": "9429dfa2a67a6c5a40c1931e4ae37246d2a0934ce7e1da2f85eeeb25e79491b5" }, "downloads": -1, "filename": "XSLClearer-0.1.1.tar.gz", "has_sig": false, "md5_digest": "50543543fed2d6e2706d3ffb640decae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13838, "upload_time": "2014-06-09T18:40:35", "url": "https://files.pythonhosted.org/packages/e4/8f/44f8223302b22d7026ae47e6bb73d6e6897a128361f0b47d465db9ba220c/XSLClearer-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "a9a8f621c64e90d1e310ebe870b94349", "sha256": "860dcfd3632a672c305db09ed027a10f294de693deac20de84ab6d80095f1eec" }, "downloads": -1, "filename": "XSLClearer-0.1.2.tar.gz", "has_sig": false, "md5_digest": "a9a8f621c64e90d1e310ebe870b94349", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13838, "upload_time": "2014-06-10T19:36:24", "url": "https://files.pythonhosted.org/packages/65/1f/00994550830fa38cc4921a90eb5a8b0dc5c837108cae9c2feef29f9ed536/XSLClearer-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "49d4c78f5d0a8c68c2bd5295933efbb9", "sha256": "735124c9889d9d5e9dfa04d171846e422bc9e4716516190b141cd89a98129a2e" }, "downloads": -1, "filename": "XSLClearer-0.1.3.tar.gz", "has_sig": false, "md5_digest": "49d4c78f5d0a8c68c2bd5295933efbb9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14001, "upload_time": "2014-06-11T06:00:32", "url": "https://files.pythonhosted.org/packages/9c/f2/a9d2d519281bc133e3d1d533ff88f09dbdaccc280ab18dc9ce5c3e7eb6dd/XSLClearer-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "49d4c78f5d0a8c68c2bd5295933efbb9", "sha256": "735124c9889d9d5e9dfa04d171846e422bc9e4716516190b141cd89a98129a2e" }, "downloads": -1, "filename": "XSLClearer-0.1.3.tar.gz", "has_sig": false, "md5_digest": "49d4c78f5d0a8c68c2bd5295933efbb9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14001, "upload_time": "2014-06-11T06:00:32", "url": "https://files.pythonhosted.org/packages/9c/f2/a9d2d519281bc133e3d1d533ff88f09dbdaccc280ab18dc9ce5c3e7eb6dd/XSLClearer-0.1.3.tar.gz" } ] }