Re: [xml] Re: libxslt question



Hi

Not according to what I read in xslt 1.1 today:

16.5 Multiple Output Documents
The xsl:document element is used to create multiple result documents. As well as the main result document, there can be subsidiary result documents. [...]


XSLT 1.1 is not a W3C Recommendation, and probably never will be.  Do
NOT use it as your reference.  XSLT 1.0 is the standard, and it is what
libxslt supports.

Note that in Lucas' example XSLT, the version on xsl:stylesheet was set
to "1.0".  If you're going to try to use XSLT 1.1 stuff, at least have
the decency to set the version attribute to "1.1".

        Ooops.... sorry... That's why copying and pasteing are sometimes
awfull :))
        Correcting myself:

<?xml version="1.0" ?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  xmlns:exsl="http://exslt.org/common";
  extension-element-prefixes="exsl">
  <xsl:output method="html"/>

  <xsl:template match="/">
    <xsl:apply-templates/>
  </xsl:template>

  <xsl:template match="doc/foo">
    <exsl:document href="{concat('out',position(),'.html')}">
      <xsl:for-each select="text">
        <html>
          <head>
            <title><xsl:value-of select="."/></title>
          </head>
          <body>
            <h1><xsl:value-of select="."/></h1>
          </body>
        </html>
      </xsl:for-each>
    </exsl:document>
  </xsl:template>
</xsl:stylesheet>


regards
--

[]'s
Lucas Brasilino
brasilino recife pe gov br
http://www.recife.pe.gov.br
Emprel -        Empresa Municipal de Informatica (pt_BR)
                Municipal Computing Enterprise (en_US)
Recife - Pernambuco - Brasil
Fone: +55-81-34167078




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