Hello,
while playing with the Saxon8-parser from M. Kay [ http:// www.saxonica.com ] i found myself typing a lot of <xsl:command foo="bar"/> stuff producing lot's of typos and mixing up the syntax. To simplify my life and to learn xslt2 i did these snippets. Almost any xsl-instruction i found in M.Kay's documents is in the bundle - these make up ~70 snippets. Some of them are chained-together, some contain links M.Kay's documentation or the related W3C-docs. Some xsl which u might find in the official-doc's are not 'visible' in the bundle, because theses are only allowed as children inside another instruction - that way the snippets might help to prevent errors. Any 'mandatory'-attribute=must have is in the snippets, characterized by a fixed attribute-name and a placeholder for the value. Optional-atts or sub-instructions show up as entire placeholders. Defaults are always in first place, if a signature is provided with the placeholder. This is not very much tested, yet. I'll continue to use and improve it more and plan to make the xsl:functions also available - maybe within a second bundle. limitations : i left out one or two xsl:instructions which deal with schema-processing and are not supported by the basic-version of Saxon. Furthermore there is and probably will never be more documentation than provided within this email-thread :-)
One question : I'd thought of auto-generation of snippets, as these are simple .plist-files, i believe it to be possible to write a stylesheet to process the html-Saxon-Doc's in order to retrieve the info from the function-library, including all signatures. I've seen that the plist-files contain a string-element like this : <string>F631FE3C-7D78-4E2E-8A17-688E9890D0B6</string> which looks like a 'unique'-(cocoa)-identifier. I have no idea what to put into this and which consequences this might have ? any ideas are truly welcome ;-)
have phun, andreas
--- XSL(v2) - bundle // v0.1 ---