This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Cascading. ( Re: Recursive Template Application )
- To: xsl-list at mulberrytech dot com
- Subject: Re: Cascading. ( Re: Recursive Template Application )
- From: Paul Tchistopolskii <paul at qub dot com>
- Date: Tue, 20 Jun 2000 03:42:01 -0700
- Organization: The Qub Group
- References: <Pine.LNX.4.21.0006200929021.18513-100000@ted.sergeant.org>
- Reply-To: xsl-list at mulberrytech dot com
----- Original Message -----
From: Matt Sergeant
> > > > > Actually there is a standard way, but its outside the realm of XSLT and
> > > > > inside the realm of XML. Its called "cascading" and is detailed in the
> > > > > HTML 4.0 spec, and referenced explicitly in
> > > > > http://www.w3.org/TR/xml-stylesheet
> >
> > I'm sorry, I failed to find the word 'cascading' in the URL you are providing.
> > (funny that, eh?)
>
> Not very funny at all - you just didn't look hard enough ;-)
>
> The concept of cascading is detailed in _the_HTML_4.0_spec_. The HTML 4.0
> spec is "referenced explicitly in
> http://www.w3.org/TR/xml-stylesheet". Does that make sense now?
Yes, it makes. 'Cascading' is something that was considered to be
good for HTML / CSS and now there is some attempt to make this model
"... a standard way, but its outside the realm of XSLT and inside the
realm of XML. "
I still think it is funny. The same pattern has been applied to XSL FOs.
I'm very happy that XSLT and XPath have survived. No kidding.
> > It is good you have a standard technique to support some typical
> > usecases, like:
> >
> > "cat some.xml | aggregate.xsl | expand_widgets.xsl | render2pdf.xsl | render.class "
> >
> > and
> >
> > "cat some.xml | aggregate.xsl | expand_widgets.xsl | render2html.xsl "
> >
> > Mind to share how to do that with AxKit powered by appropriate w3c
> > standard technique for cascading ?
>
> Sure:
>
> "cat some.xml"
>
> The "cat" here picks up the stylesheets that are to be used from the
> <?xml-stylesheet?> processing instructions, as per the w3c spec.
Hmm... In my example, 'cat' is:
cat.xsl
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="ux-argv1" />
<xsl:template match="/">
<xsl:copy-of select="document( $ux-argv1 )" />
</xsl:template>
</xsl:stylesheet>
'cat.xsl' could be appied to any file and has no knowledge about the future
of the dataflow.
Do I understand right that in your universe 'cat' is transaction-specific thing?
In this case the semantics of your 'cat' will be similiar to semantics
of Ux pipe. ... but I think my guesses are wrong again. Could you pelase
explain *what* is your 'cat' which conforms to some w3c standard (right?)
I wish you also have another 'standard' answer regarding:
cat some.xml | aggregate.xsl mode="terse" | expand_widgets.xsl | render2html.xsl
font="big"
( I think that tuning transformations with some parameters is unavoidable
thing in the real life. Can you imagine scripts without parameters? Scripts are
transformations ).
> > I'm sorry if it was not appropriate to place this view on chaining
> > in reply to your letter ( because I now realize that your leter was
> > actualy talking about the standards which are good for us, right ? )
>
> Right. I'm not trying to flog AxKit to everyone here - most people will
> prefer a Java solution anyway (poor lost souls ;-)), just trying to point
> out that there is a standard for cascading that applies to XSLT.
I don't think it makes too much sense with XSLT. BTW - I don't
see any problem if you explain to poor lost souls what variations
AxKit does ( or is planning to do ) around XSLT. I wish it is not the
off-topic here.
> >
> > Poor me, who is now using document( "!/ ls | sort | verbose") in almost
> > every XSLT stylesheet .... It is not standard....
>
> Indeed - I'm amazed it even works ;-)
So was I, when I realized that almost everything could be done with any
java component if the component extends SAXparser. Ux embedds
XT, because XT is SAXParser. Ux itself is a SAXParser so 'the entire thing '
could be easily embedded into other programm. I realy like this game and
hardly remember similiar things happening before XML.
BTW - is Salbotron SAXParser? Is it providing parse() and
setDocumentHandler() to the perl code? If yes - you can
have the same document( "/! perl-bean1 | perl-bean2" )
in perl. Ux pattern is universal and should be easy to
re-implement in any language, because it is plain SAX
and nothing more.
Rgds.Paul.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list