On Wednesday 10 July 2002 06:25, Joseph Kesselman wrote:
> Which is why it's being corrected in XSLT 2.0.

Yes, that is a Good Thing.  Unfortunately, we're stuck with 1.0 for another 
year or so.  (BTW, has Xalan made any moves towards supporting 2.0?  Will 
that be Xalan3 or something?)

>  But a "quirks" solution would be no better than the extensions we have
> now. Less so, if anything, because it hides the details of where you're
> departing from the standard and thus makes porting the stylesheet to
> another processor with different quirks much, much harder.

Only people who know that they "want" quirks would enable it.  Hopefully this 
would be an "enable at your own risk" thing.

>  "Quirks" simplifies things only as long as you never change processors, or
> change only to processors that have _IDENTICAL_ quirks. If the quirks don't
> match *exactly*, it rapidly becomes a maintainance disaster.

This particular quirk (casting RTF->node-set) *is* the same with other 
processors.  That's why I've requested it.  Xalan is the only one that 
doesn't do it.


The best way I can think to do it would be to add a namespaced attribute to 
the stylesheet root, like this:

<xsl:stylesheet ... xalan:auto-rtf-to-nodeset="yes" xmlns:xalan="...">

To me, it's pretty obvious that a stylesheet is using extended functionality 
whenever I see a xalan:xxx or saxon:xxx name.  Saxon and other processors all 
provide the ability to customize the processing using such attributes, for 
example to control the output escaping by a special attribute on 
<xsl:output/>.


In general, I agree that random deviations from the spec are a Bad Thing, at 
least from a portability standpoint.  But in this case, allowing deviation 
would make stylesheets *more* portable, not to mention easier to write.

-- 
Peter Davis

Reply via email to