Re: SGML output from XSL?

Subject: Re: SGML output from XSL?
From: Paul Prescod <paul@xxxxxxxxxxx>
Date: Mon, 08 Feb 1999 18:27:58 -0600
Chris Lilley wrote:
> No; XSL outputs XML. 

The XSL specification does not formally define an output language. It
defines a concept called a "result tree." That result tree has no
serialization syntax. XML is an obvious syntax for engines that want to
serialize the output tree, but that doesn't mean that an XSL
implementation needs to output that tree in XML or any other syntax.

> If XSL can output HTML, it is because it can be
> expressed in XML which is what Voyager does. 

The XSL specification explicitly describes how to create non-XML HTML. The
note in section 2.2 is very explicit. 

> So it needs a URIO to
> define the HTML namespace and ther URI for the HTML 4.0 recommendationis
> as good as any.

The URI for the HTML 4.0 recommenndation is a pointer to *HTML 4.0*. HTML
4.0 is based on full SGML not XML. Voyager has its own URI. If the XSL
spec meant voyager it would use the voyager URI.

James Clark has already implemented this:

  private static final String[][] resultNamespaceMap = {
    // Add new entries here.
    { "";,
"com.jclark.xsl.sax.HTMLOutputHandler" }

That's a nice use of Java reflection features.

> OK well I would say that is outside the scope of XSL. It was discussed
> earlier, and the idea of a post processing filter that takes XML and
> spits out some wierd stuff seemed to be that way people thought this
> should be done.

Right. And it is triggered with a result-ns declaration.

> > "If an implementation wishes to use something in the result tree or
> > stylesheet to control the output of a non-XML representation of the result
> > tree, it should use the result namespace."
> But the result namespace is not the same thing as the name of the
> non-XML representation (whic, not being XML, doesn';t have a namespace).

Namespaces are not required to name "XML vocabularies" or "XML schemas" or
anything else even vaguely XML related. Namespaces are a completely
abstract concept and the namespace URI can point to anything or nothing.
They are merely a *trigger* for recognition of elements and attributes in
the input. In this case, they trigger the recognition of elements and
attributes that should be output in some non-XML syntax.
 Paul Prescod  - ISOGEN Consulting Engineer speaking for only himself

"Remember, Ginger Rogers did everything that Fred Astaire did,
but she did it backwards and in high heels."
                                               --Faith Whittlesey

 XSL-List info and archive:

Current Thread