[Standards] XEP-0204: CDO and REX update?

Ryan ryan at evine.ca
Mon Mar 12 19:19:40 UTC 2007


Apologies for the double post.

Robin wrote:
> I'm just curious and worked with XSLT a bit (mostly for stylesheet
> processing): How can I express 'updates' with a 'Stylesheet Language'?

XSLT is not actually a 'Stylesheet Language', but rather a transformation 
system. With XSLT you can output any text you want, which is often HTML, thus 
applying some 'style' to the XML. XSL-FO (formatting objects) were created 
because XSL didn't have a formatting system of it's own.

For example, the following will removes a "bar" element from a document rooted 
at "foo":

<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>

  <!-- remove "bar" from "foo" -->
  <xsl:template match="/foo/bar"/>
    
  <xsl:template match="node() | @*" name="identity">
    <xsl:copy>
      <xsl:apply-templates select="node() | @*"/>
    </xsl:copy>
  </xsl:template>

</xsl:stylesheet>


As I said, there are room for some optimizations. 

--Ryan



More information about the Standards mailing list