- From: David Cramer <david@thingbag.net>
- Date: Sat, 18 Feb 2012 14:29:41 -0600
- To: xproc-dev@w3.org
- Message-ID: <4F400A35.1030800@thingbag.net>
The titlepage templates mechanism in the DocBook xsls use xslt to generate xslt: http://www.sagehill.net/docbookxsl/HTMLTitlePage.html David On 2/18/12 12:51 PM, Zearin wrote: > Thanks Geert. :) > > Anybody else know something about this? > > > —Zearin (Tony) > > On Feb 15, 2012, at 10:50 AM, Geert Josten wrote: >> Hi Zearin, >> >> >> >> I have faced a few similar cases: >> >> >> >> One was a system in which we needed to do arbitrary document >> conversions. These conversions would be based on mappings provided by >> content specialists, without developer experience. We identified >> various typical actions, like wrap, unwrap, group, suppress, things >> like that, and specified an XML syntax to express that. We developed >> an XSLT that generated another XSLT which was able to do conversions >> according to the mapping expressed in XML. Was quite powerful, even >> despite the fact that it was still in the 1.0 era. That mapping also >> allowed to derive another XSLT that could do completeness checks. >> >> >> >> Another system involved transforming potentially arbitrary Word >> documents (saved as Word 2003 XML for instance) to pretty much >> arbitrary XML. Word documents have distinct features, like >> paragraphs, styled character ranges, hyperlinks, images, headings, >> etc. We had mappings expressed in XML that provided instructions for >> each of such features (matching on characteristics like font styling, >> style name, etc). This mapping was converted to XSLT using XSLT as >> well, also all 1.0. >> >> >> >> I spoke in past tense, but actually have used the latter for a new >> project. Was quite general. >> >> >> >> So, I suggest you try to identify the functional manipulations you >> actually need. Find a syntax for that, then write XSLT (or something >> else) to convert that into XSLT (and/or XQuery/XProc/...).. >> >> >> >> Cheers, >> Geert >> >> >> >> *Van:* Tony R. [mailto:tony@gonk.net <mailto:tony@gonk.net>] >> *Verzonden:* woensdag 15 februari 2012 16:07 >> *Aan:* XProc Dev >> *Onderwerp:* Generating XProc/XSL with XProc/XSL >> >> >> >> Let’s say I want to write some XSL templates that allow me to map >> arbitrary XML grammars into SVG. I know what I want the SVG to look >> like, and I know that the intended XML grammar is guaranteed to have >> certain pieces of data that I want to map to SVG using XSL. >> >> >> >> I’ve been in similar situations many times, but even with Oxygen (and >> I love Oxygen to bits—it’s a fantastic IDE!) it can get tedious. >> >> >> >> I have occasionally stumbled into the DocBook XSL files and seen >> comments stating “This is a generated XSL file—do not edit!” >> >> >> >> … >> >> >> >> How does one go about writing XProc or XSL to generate XSL? I mean, >> how do you do it /intelligently?/ I’m looking for: >> >> >> >> * human-friendly method of writing the “generator” code >> * human-friendly code produced by the “generator” >> * flexible, modular code produced by the “generator” >> >> >> >> —Zearin (Tony) >
Received on Saturday, 18 February 2012 20:30:07 UTC