Subject: RE: [xsl] xsl/xslt coding standard From: "James Fuller" <james.fuller@xxxxxxxxxx> Date: Sat, 17 Aug 2002 13:22:39 +0100 |
> But having said all that, I'm perfectly at ease with a xsl:doc element > or something similar, as long as it doesn't constrain what I put > inside it. I would expect something that can standalone...thats why I think using something that is at least neutral within a whole bunch of markup situations is more appropriate. For example, having a snippet of XHTML doesnt bother me if I find it within a VOICEML or RDF document, but having a snippet of XSL in these docs....just dont make any sense; XSL core reason for being...that of a language of transformation.... resusing and extending the XHTML meta information module allows for this with the following benefits; - XHTML is a native format one can use for documentation, so there is a standard native option that is close enough to the HTML we all know and love ( instead of XSLT or XML schema specific, niether of who's core requirement is to be a language for documentation or meta data ) - you can enclose any markup with meta:doc; for example lets say you want to use Docbook, Dublin Core, there is no constraint imposed on by using XHTML, whereas xsl living outside of an <xsl:stylesheet/> declaration is probably invalid XSLT, though part of the xslt namespace. - XHTML meta module is existing now, and can be extended, so for now I think having a <meta:doc/> is easily defined...for those who want to use something akin to XML Schema they can define a <meta:annotation/> and <meta:documentation/> or whatever.... so possibly ..... ( is see you have gone 2.0 jeni ! ) <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:doc="http://www.example.com/documentation" xmlns="http://www.w3.org/1999/xhtml" documentation-element-prefixes="doc"> <xsl:template match="/"> <doc:doc> <p>This is the <em>main template</em>...</p> </doc:doc> ... </xsl:template> </xsl:stylesheet> this makes much more sense then an doc element within the XSL namespace ( e.g. xsl:doc )...though of course the danger is that there are many many efforts trying to be the end all definition of meta data or documentation....this reinforces using XHTML as the basic underpinning of such an effort...look at RDDL as a good example of the XHTML modularization effort. After 2nd reading I am not against telling the XSL processor which namespaces are document associated....but maybe some level of indirection is now needed( I have always predicted the need for more namespace handling like this )....in that we can create groups of namespaces( prefixes ) as already I can see the xsl:stylesheet element growing with way too many attributes dealing with essentially 'groups' of namespaces with which to do some sort of processing to..... for example; <xsl:stylesheet id = id extension-element-prefixes = tokens exclude-result-prefixes = tokens exclude-prefixes = tokens version = number default-xpath-namespace = uri> <!-- Content: (xsl:import*, top-level-elements) --> </xsl:stylesheet> we have 3 attributes ( and 4 with documentation-element-prefixes="doc" ) doing some sort of namespace grouped action..... - can we possibly define a named template that do some pre or post processing to groups of elements and attributes based on groups of namespaces....akin to built in templates; I'm certain that we could write xslt template that handles the 'exclude' style stripping....something like ..havent thought it through though ! - something like <xsl:namespace-group name="exclude_result" namespaces="test doc" processing-type=" before | after " named-template=""/>...havent completely thought this out also ! ok, so whilst talking about a documentation convention, i've also introduced a style of namespace handling....sorry about that ! thoughts ? cheers ,jim fuller cheers, jim fuller XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] xsl/xslt coding standard, Jeni Tennison | Thread | Re: [xsl] xsl/xslt coding standard, Larry Garfield |
Re: [xsl] xsl/xslt coding standard, Jeni Tennison | Date | the time for XSLT to rally around X, James Fuller |
Month |