[Home] [By Thread] [By Date] [Recent Entries]

  • From: Francis Norton <francis@r...>
  • To: xml-dev <xml-dev@l...>
  • Date: Sun, 25 Feb 2001 22:22:02 +0000

Brian Miller wrote:
> 
...
> 
> If a stylesheet emits PostScript, then surely its
> XSLT can't be thought of as a mapping between
> infosets.
> 
> A hypothetical alternative to XSLT which only mapped
> infosets would surely be safer and faster than XSLT.
> 
It might be simpler to define a simple subset of XSLT that mandates the
(anyway default) values xsl:output/@type="xml" and
//*/@disable-output-escaping="no" - in fact you could both define and
implement it in a few lines of schematron.

Francis.


In rpinciple this *should* do it, though you'd need a fairly smart
implementation to avoid namespace confusion with the xslt prefix ...

<sch:schema xmlns:sch="http://www.ascc.net/xml/schematron">
 <sch:title>Infoset XSLT</sch:title>
 <sch:ns prefix="xslt" uri="http://www.w3.org/1999/XSL/Transform"/>
  <sch:pattern>
   <sch:rule context="xslt:output">
    <sch:assert test="not(@type) or @type='xml'"
         >If present, the type attribute of any xsl:output element must
be 'xml'".</sch:assert>
   </sch:rule>
   <sch:rule context="xslt:*">
    <sch:assert test="not(@disable-output-escaping) or
@disable-output-escaping='no'"
         >If present, the disable-output-escaping attribute must be
'no'".</sch:assert>
   </sch:rule>
  </sch:pattern>
</sch:schema>

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member