[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Extended file extentions (XfeX) for xml/xsl files

Subject: Extended file extentions (XfeX) for xml/xsl files
From: Stefano Mazzocchi <stefano@xxxxxxxxxx>
Date: Thu, 25 Nov 1999 15:12:00 +0100
file extentions
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.