Subject: Extended file extentions (XfeX) for xml/xsl files
From: Stefano Mazzocchi <stefano@xxxxxxxxxx>
Date: Thu, 25 Nov 1999 15:12:00 +0100
|
James Tauber wrote:
>
> > The ones used for the XSLT and XPath Recs are at:
> >
> > ftp://ftp.jclark.com/pub/xml/xmlspec.xsl
> > ftp://ftp.jclark.com/pub/xml/xpath.xsl
> > ftp://ftp.jclark.com/pub/xml/xslt.xsl
>
> But these are for xmlspec -> HTML, right?
Totally out of context, but I would like to hear your comments about
this.
XSLT is able to perform all a bunch of file format transformations, but
people usually use the ".xsl" extention for the xsl transformation
sheets.
For Cocoon included samples, I came out with a very simple "design
pattern" for extended file extentions that works like this:
hello.xml
hello.html.xsl
hello.wml.xsl
hello.vml.xsl
hello.svg.xsl
hello.fo.xsl
hello.vrml.xsl
hello.x3d.xsl
see the pattern? A more generalized pattern is
wd-xslt.spec.xml
users.spec.html.xsl
developers.spec.html.xsl
simple.spec.fo.xml
fancy.spec.fo.xml
In general, the XfeX pattern works like this
filename[.doctype].xml
filename[.input_doctype][.output_format].xsl
where
doctype := document root element
input_doctype := input document root element
output_format := the output format
Problems:
1) two different DTDs may share the same root element, thus breaking the
whole deal. Since namespace syntax is not allowed in file name (":" is
an illegal char on many file systems) and full URL expansion is
impractical, it's up to the write to find matching unique names for the
"doctype" and "input_doctype" identifiers.
2) the output format is not directly related to the xsl:output element.
In fact, FO, SVG, WML, VML and X3D are all valid XML formats, and they
share the same output handler. So, the "output_format" identifier is the
key to a map like this
html -> ("html", "-//W3C//DTD HTML 4.0//EN")
wml -> ("xml", "-//WAPFORUM//DTD WML 1.1//EN")
vml -> ("xml", "...")
fo -> ("xml", "...")
svg -> ("xml", "...")
x3d -> ("xml", "...")
vrml -> ("text", "...")
css -> ("text", "...")
csv -> ("text", "...")
and so on
(where the "..." stand for the formal public identifiers or, if not
available, some unique identifiers)
What do you think?
(don't want to impose this to anyone, but I'm trying to come up with a
general file naming pattern that we can use extensively at least between
the Apache XML projects to simplify file management. Any comment is, of
course, happily welcome :)
--
Stefano Mazzocchi One must still have chaos in oneself to be
able to give birth to a dancing star.
<stefano@xxxxxxxxxx> Friedrich Nietzsche
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|
James Tauber - Thu, 25 Nov 1999 12:25:10 +0800
|
|