OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Data Model(s) for XML 1.0 / XML Devcon / DOM / XSL / Query



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>