You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by dm...@locus.apache.org on 2000/12/15 20:37:10 UTC

cvs commit: xml-xalan/test/tests/conf/idkey/err t04.dtd idkeyerr01.xsl idkeyerr02.xml idkeyerr02.xsl idkeyerr03.xml idkeyerr03.xsl idkeyerr04.xml idkeyerr04.xsl idkeyerr05.xml idkeyerr05.xsl idkeyerr06.xml idkeyerr06.xsl idkeyerr07.xml idkeyerr07.xsl idkeyerr08.xml idkeyerr08.xsl idkeyerr09.xml idkeyerr09.xsl idkeyerr10.xml idkeyerr10.xsl idkeyerr11.xml idkeyerr11.xsl idkeyerr12.xml idkeyerr12.xsl idkeyerr13.xml idkeyerr13.xsl idkeyerr14.xml idkeyerr14.xsl idkeyerr15.xml idkeyerr15.xsl idkeyerr16.xml idkeyerr16.xsl idkeyerr17.xml idkeyerr17.xsl idkeyerr18.xml idkeyerr18.xsl idkeyerr19.xml idkeyerr19.xsl idkeyerr20.xml idkeyerr20.xsl idkeyerr01.xml

dmarston    00/12/15 11:37:09

  Added:       test/tests/conf/idkey/err t04.dtd idkeyerr01.xsl
                        idkeyerr02.xml idkeyerr02.xsl idkeyerr03.xml
                        idkeyerr03.xsl idkeyerr04.xml idkeyerr04.xsl
                        idkeyerr05.xml idkeyerr05.xsl idkeyerr06.xml
                        idkeyerr06.xsl idkeyerr07.xml idkeyerr07.xsl
                        idkeyerr08.xml idkeyerr08.xsl idkeyerr09.xml
                        idkeyerr09.xsl idkeyerr10.xml idkeyerr10.xsl
                        idkeyerr11.xml idkeyerr11.xsl idkeyerr12.xml
                        idkeyerr12.xsl idkeyerr13.xml idkeyerr13.xsl
                        idkeyerr14.xml idkeyerr14.xsl idkeyerr15.xml
                        idkeyerr15.xsl idkeyerr16.xml idkeyerr16.xsl
                        idkeyerr17.xml idkeyerr17.xsl idkeyerr18.xml
                        idkeyerr18.xsl idkeyerr19.xml idkeyerr19.xsl
                        idkeyerr20.xml idkeyerr20.xsl idkeyerr01.xml
  Log:
  Copy of tests in Lotus/IBM repository
  
  Revision  Changes    Path
  1.1                  xml-xalan/test/tests/conf/idkey/err/t04.dtd
  
  Index: t04.dtd
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  
  <!ELEMENT t04 (a*)>
  <!ELEMENT a EMPTY>
  <!ATTLIST a  id ID #REQUIRED> 
  
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr01.xsl
  
  Index: idkeyerr01.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: idkeyerr01 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 12.2 -->
    <!-- Purpose: Test for missing name attribute in xsl:key. -->
    <!-- Creator: David Marston -->
    <!-- ExpectedException: xsl:key requires a name attribute! -->
    <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: xsl:key requires a name attribute! -->
  
  <xsl:output indent="yes"/>
  
  <xsl:key match="div" use="title" />
  
  <xsl:template match="doc">
    <xsl:value-of select="key('mykey', 'Introduction')/p"/>
    <xsl:value-of select="key('mykey', 'Stylesheet Structure')/p"/>
    <xsl:value-of select="key('mykey', 'Expressions')/p"/>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr02.xml
  
  Index: idkeyerr02.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <div>
      <title>Introduction</title>
      <p>Intro Section.</p>
    </div>
    
    <div>
      <title>Stylesheet Structure</title>
      <p>SS Section.</p>
    </div>
    
    <div>
      <title>Expressions</title>
      <p>Exp Section.</p>
    </div>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr02.xsl
  
  Index: idkeyerr02.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: idkeyerr02 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 12.2 -->
    <!-- Purpose: Test for missing match attribute in xsl:key. -->
    <!-- Creator: David Marston -->
    <!-- ExpectedException: xsl:key requires a match attribute! -->
    <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: xsl:key requires a match attribute! -->
    
  <xsl:output indent="yes"/>
  
  <xsl:key name="mykey" use="title"/>
  
  <xsl:template match="doc">
    <xsl:value-of select="key('mykey', 'Introduction')/p"/>
    <xsl:value-of select="key('mykey', 'Stylesheet Structure')/p"/>
    <xsl:value-of select="key('mykey', 'Expressions')/p"/>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr03.xml
  
  Index: idkeyerr03.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <div>
      <title>Introduction</title>
      <p>Intro Section.</p>
    </div>
    
    <div>
      <title>Stylesheet Structure</title>
      <p>SS Section.</p>
    </div>
    
    <div>
      <title>Expressions</title>
      <p>Exp Section.</p>
    </div>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr03.xsl
  
  Index: idkeyerr03.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: idkeyerr03 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 12.2 -->
    <!-- Purpose: Test for missing use attribute in xsl:key. -->
    <!-- Creator: David Marston -->
    <!-- ExpectedException: xsl:key requires a use attribute! -->
    <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: xsl:key requires a use attribute! -->
    
  <xsl:output indent="yes"/>
  
  <xsl:key name="mykey" match="div" />
  
  <xsl:template match="doc">
    <xsl:value-of select="key('mykey', 'Introduction')/p"/>
    <xsl:value-of select="key('mykey', 'Stylesheet Structure')/p"/>
    <xsl:value-of select="key('mykey', 'Expressions')/p"/>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr04.xml
  
  Index: idkeyerr04.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <div>
      <title>Introduction</title>
      <p>Intro Section.</p>
    </div>
    
    <div>
      <title>Stylesheet Structure</title>
      <p>SS Section.</p>
    </div>
    
    <div>
      <title>Expressions</title>
      <p>Exp Section.</p>
    </div>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr04.xsl
  
  Index: idkeyerr04.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: idkeyerr04 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 12.2 -->
    <!-- Purpose: Test for two name attributes in xsl:key. -->
    <!-- Creator: David Marston -->
    <!-- ExpectedException: Attribute "name" was already specified for element "xsl:key". -->
    <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: Attribute "name" was already specified for element "xsl:key". -->
  
  <xsl:output indent="yes"/>
  
  <xsl:key name="mykey" match="div" use="title" name="otherkey" />
  
  <xsl:template match="doc">
    <xsl:value-of select="key('mykey', 'Introduction')/p"/>
    <xsl:value-of select="key('mykey', 'Stylesheet Structure')/p"/>
    <xsl:value-of select="key('mykey', 'Expressions')/p"/>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr05.xml
  
  Index: idkeyerr05.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <div>
      <title>Introduction</title>
      <p>Intro Section.</p>
    </div>
    
    <div>
      <title>Stylesheet Structure</title>
      <p>SS Section.</p>
    </div>
    
    <div>
      <title>Expressions</title>
      <p>Exp Section.</p>
    </div>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr05.xsl
  
  Index: idkeyerr05.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: idkeyerr05 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 12.2 -->
    <!-- Purpose: Test for two match attributes in xsl:key. -->
    <!-- Creator: David Marston -->
    <!-- ExpectedException: Attribute "match" was already specified for element "xsl:key". -->
    <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: Attribute "match" was already specified for element "xsl:key". -->
    
  <xsl:output indent="yes"/>
  
  <xsl:key name="mykey" match="foo" use="title" match="div" />
  
  <xsl:template match="doc">
    <xsl:value-of select="key('mykey', 'Introduction')/p"/>
    <xsl:value-of select="key('mykey', 'Stylesheet Structure')/p"/>
    <xsl:value-of select="key('mykey', 'Expressions')/p"/>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr06.xml
  
  Index: idkeyerr06.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <div>
      <title>Introduction</title>
      <p>Intro Section.</p>
    </div>
    
    <div>
      <title>Stylesheet Structure</title>
      <p>SS Section.</p>
    </div>
    
    <div>
      <title>Expressions</title>
      <p>Exp Section.</p>
    </div>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr06.xsl
  
  Index: idkeyerr06.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: idkeyerr06 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 12.2 -->
    <!-- Purpose: Test for two use attributes in xsl:key. -->
    <!-- Creator: David Marston -->
    <!-- ExpectedException: Attribute "use" was already specified for element "xsl:key". -->
    <!-- ExpectedException: org.apache.xalan.xslt.XSLProcessorException: Attribute "use" was already specified for element "xsl:key". -->
  
  <xsl:output indent="yes"/>
  
  <xsl:key name="mykey" use="foo" match="div" use="title"/>
  
  <xsl:template match="doc">
    <xsl:value-of select="key('mykey', 'Introduction')/p"/>
    <xsl:value-of select="key('mykey', 'Stylesheet Structure')/p"/>
    <xsl:value-of select="key('mykey', 'Expressions')/p"/>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr07.xml
  
  Index: idkeyerr07.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <div>
      <title>Introduction</title>
      <p>Intro Section.</p>
    </div>
    
    <div>
      <title>Stylesheet Structure</title>
      <p>SS Section.</p>
    </div>
    
    <div>
      <title>Expressions</title>
      <p>Exp Section.</p>
    </div>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr07.xsl
  
  Index: idkeyerr07.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: idkeyerr07 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 12.2 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Test for invalid value of name attribute in xsl:key. -->
    <!-- ExpectedException: name contains invalid characters -->
  
  <xsl:output indent="yes"/>
  
  <xsl:key name="+" match="div" use="title"/>
  
  <xsl:template match="doc">
    <xsl:value-of select="key('+', 'Introduction')/p"/>
    <xsl:value-of select="key('+', 'Stylesheet Structure')/p"/>
    <xsl:value-of select="key('+', 'Expressions')/p"/>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr08.xml
  
  Index: idkeyerr08.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <div>
      <title>Introduction</title>
      <p>Intro Section.</p>
    </div>
    
    <div>
      <title>Stylesheet Structure</title>
      <p>SS Section.</p>
    </div>
    
    <div>
      <title>Expressions</title>
      <p>Exp Section.</p>
    </div>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr08.xsl
  
  Index: idkeyerr08.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: idkeyerr08 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 12.2 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Test for invalid value of match attribute in xsl:key. -->
    <!-- ExpectedException: Invalid match pattern -->
  
  <xsl:output indent="yes"/>
  
  <xsl:key name="mykey" match="+" use="title"/>
  
  <xsl:template match="doc">
    <xsl:value-of select="key('mykey', 'Introduction')/p"/>
    <xsl:value-of select="key('mykey', 'Stylesheet Structure')/p"/>
    <xsl:value-of select="key('mykey', 'Expressions')/p"/>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr09.xml
  
  Index: idkeyerr09.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <div>
      <title>Introduction</title>
      <p>Intro Section.</p>
    </div>
    
    <div>
      <title>Stylesheet Structure</title>
      <p>SS Section.</p>
    </div>
    
    <div>
      <title>Expressions</title>
      <p>Exp Section.</p>
    </div>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr09.xsl
  
  Index: idkeyerr09.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: idkeyerr09 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 12.2 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Test for invalid value of use attribute in xsl:key. -->
    <!-- ExpectedException: invalid use expression -->
  
  <xsl:output indent="yes"/>
  
  <xsl:key name="mykey" match="div" use="+"/>
  
  <xsl:template match="doc">
    <xsl:value-of select="key('mykey', 'Introduction')/p"/>
    <xsl:value-of select="key('mykey', 'Stylesheet Structure')/p"/>
    <xsl:value-of select="key('mykey', 'Expressions')/p"/>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr10.xml
  
  Index: idkeyerr10.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <div>
      <title>Introduction</title>
      <p>Intro Section.</p>
    </div>
    
    <div>
      <title>Stylesheet Structure</title>
      <p>SS Section.</p>
    </div>
    
    <div>
      <title>Expressions</title>
      <p>Exp Section.</p>
    </div>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr10.xsl
  
  Index: idkeyerr10.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: idkeyerr10 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 12.2 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Test for use of key() without a corresponding xsl:key declaration. -->
    <!-- ExpectedException: There is no xsl:key declaration for "mykey" -->
  
  <xsl:output indent="yes"/>
  
  <xsl:key name="mykeyspace" match="div" use="title"/>
  
  <xsl:template match="doc">
    <xsl:value-of select="key('mykey', 'Introduction')/p"/>
    <xsl:value-of select="key('mykey', 'Stylesheet Structure')/p"/>
    <xsl:value-of select="key('mykey', 'Expressions')/p"/>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr11.xml
  
  Index: idkeyerr11.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <div>
      <title>Introduction</title>
      <p>Intro Section.</p>
    </div>
    
    <div>
      <title>Stylesheet Structure</title>
      <p>SS Section.</p>
    </div>
    
    <div>
      <title>Expressions</title>
      <p>Exp Section.</p>
    </div>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr11.xsl
  
  Index: idkeyerr11.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: idkeyerr11 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 12.2 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: It is an error for the "match" attribute on xsl:key to contain a variable reference. -->
    <!-- ExpectedException: Extra illegal tokens: 'v1' -->
  
  <xsl:output indent="yes"/>
  <xsl:variable name="v1">div</xsl:variable>
  
  <xsl:key name="mykey" match="$v1" use="title"/>
  
  <xsl:template match="doc">
    <xsl:value-of select="key('mykey', 'Introduction')/p"/>
    <xsl:value-of select="key('mykey', 'Stylesheet Structure')/p"/>
    <xsl:value-of select="key('mykey', 'Expressions')/p"/>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr12.xml
  
  Index: idkeyerr12.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <div>
      <title>Introduction</title>
      <p>Intro Section.</p>
    </div>
    
    <div>
      <title>Stylesheet Structure</title>
      <p>SS Section.</p>
    </div>
    
    <div>
      <title>Expressions</title>
      <p>Exp Section.</p>
    </div>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr12.xsl
  
  Index: idkeyerr12.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: idkeyerr12 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 12.2 -->
    <!-- Purpose: It is an error for the "use" attribute on xsl:key to contain a variable reference. -->
    <!-- Creator: David Marston -->
    <!-- ExpectedException: Extra illegal tokens: 'v1' -->
  
  <xsl:output indent="yes"/>
  <xsl:variable name="v1">title</xsl:variable>
  
  <xsl:key name="mykey" match="div" use="$v1" />
  
  <xsl:template match="doc">
    <xsl:value-of select="key('mykey', 'Introduction')/p"/>
    <xsl:value-of select="key('mykey', 'Stylesheet Structure')/p"/>
    <xsl:value-of select="key('mykey', 'Expressions')/p"/>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr13.xml
  
  Index: idkeyerr13.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <div id="id1">
      <title>Introduction</title>
      <p>For more information see the <divref>Expressions</divref> section.</p>
      <p>(alternate id link: <keydivref>id3</keydivref>)</p>
    </div>
    
    <div id="id2">
      <title>Stylesheet Structure</title>
      <p>For more information see the <divref>Introduction</divref> section.</p>
      <p>(alternate id link: <keydivref>id1</keydivref>)</p>
    </div>
    
    <div id="id3">
      <title>Expressions</title>
      <p>For more information see the <divref>Stylesheet Structure</divref> section.</p>
      <p>(alternate id link: <keydivref>id2</keydivref>)</p>
    </div>
  </doc>
  
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr13.xsl
  
  Index: idkeyerr13.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: idkeyerr13 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 12.2 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Test for two xsl:key declarations with the same name attribute. -->
    <!-- The spec allows this. If the processor implements the feature, then 'titles' is
       one keyspace where the two types of 'use' nodes index their designated match nodes,
       but don't cross-index the others as would happen if | notation was used in one xsl:key. -->
  
  <xsl:output indent="yes"/>
  
  <xsl:key name="titles" match="div" use="title"/>
  <xsl:key name="titles" match="@id" use="@id"/>
  
  <xsl:template match="doc">
    <P>Reference numbers should match the titles, links should work.</P>
    <xsl:for-each select="div">
      <HR/>
      <H1 id="{generate-id(.)}">
        <xsl:number level="multiple" count="div" format="1.1. "/>
        <xsl:value-of select="title"/></H1>
      <xsl:apply-templates/>
    </xsl:for-each>
  </xsl:template>
  
  <xsl:template match="p">
    <P><xsl:apply-templates/></P>
  </xsl:template>
  
  <xsl:template match="divref">
    <A href="#{generate-id(key('titles', .))}">
      <xsl:for-each select="key('titles', .)">
        <xsl:number level="multiple" count="div" format="1.1. "/>
      </xsl:for-each>
      <xsl:value-of select="."/>
    </A>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr14.xml
  
  Index: idkeyerr14.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <div>
      <title>Introduction</title>
      <p>Intro Section.</p>
    </div>
    
    <div>
      <title>Stylesheet Structure</title>
      <p>SS Section.</p>
    </div>
    
    <div>
      <title>Expressions</title>
      <p>Exp Section.</p>
    </div>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr14.xsl
  
  Index: idkeyerr14.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: idkeyerr14 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 12.2 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Call key() with too few arguments. -->
    <!-- ExpectedException: key() requires two arguments -->
  
  <xsl:output indent="yes"/>
  
  <xsl:key name="mykey" match="div" use="title" />
  
  <xsl:template match="doc">
    <xsl:value-of select="key('Expressions')/p"/>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr15.xml
  
  Index: idkeyerr15.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <div>
      <title>Introduction</title>
      <p>Intro Section.</p>
    </div>
    
    <div>
      <title>Stylesheet Structure</title>
      <p>SS Section.</p>
    </div>
    
    <div>
      <title>Expressions</title>
      <p>Exp Section.</p>
    </div>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr15.xsl
  
  Index: idkeyerr15.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: idkeyerr15 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 12.2 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Call key() with too many arguments. -->
    <!-- ExpectedException: key() requires two arguments -->
  
  <xsl:output indent="yes"/>
  
  <xsl:key name="mykey" match="div" use="title" />
  
  <xsl:template match="doc">
    <xsl:value-of select="key('mykey','Expressions','useless')/p"/>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr16.xml
  
  Index: idkeyerr16.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
  <a/>
  <a/>
  <b/>
  <c/>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr16.xsl
  
  Index: idkeyerr16.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: idkeyerr16 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 12.4 Miscellaneous Additional Functions  -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Test of 'generate-id()' with multiple arguments. Should generate
         an error. Should test for zero, or one argument.  -->
    <!-- ExpectedException: ??? -->
  
  <xsl:template match="doc">
    <out>
      <xsl:value-of select="generate-id(a,d)"/><xsl:text>,</xsl:text>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr17.xml
  
  Index: idkeyerr17.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <div id="id1">
      <title>Introduction</title>
      <p>For more information see the <divref>Expressions</divref> section.</p>
      <p>(alternate id link: <keydivref>id3</keydivref>)</p>
    </div>
  </doc>
  
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr17.xsl
  
  Index: idkeyerr17.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: idkeyerr17 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 12.2 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Test placement of xsl:key inside atemplate, which is illegal. -->
    <!-- ExpectedException: XSLT: (StylesheetHandler) xsl:key is not allowed inside a template! -->
  
  <xsl:template match="doc">
    <out>
      <xsl:key name="titles" match="div" use="title"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr18.xml
  
  Index: idkeyerr18.xml
  ===================================================================
  <?xml version="1.0"?>
  <!DOCTYPE t04 SYSTEM "t04.dtd">
  
  <t04>
    <a id="a"/>
    <a id="b"/>
    <a id="c"/>
    <a id="d"/>
  </t04>
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr18.xsl
  
  Index: idkeyerr18.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: idkeyerr18 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 4.1 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Test for id() with too few arguments. -->
    <!-- ExpectedException: id() should have one argument -->
  
  <xsl:template match="t04">
    <out>
      <xsl:value-of select="id()/@id"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr19.xml
  
  Index: idkeyerr19.xml
  ===================================================================
  <?xml version="1.0"?>
  <!DOCTYPE t04 SYSTEM "t04.dtd">
  
  <t04>
    <a id="a"/>
    <a id="b"/>
    <a id="c"/>
    <a id="d"/>
  </t04>
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr19.xsl
  
  Index: idkeyerr19.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: idkeyerr19 -->
    <!-- Document: http://www.w3.org/TR/xpath -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 4.1 -->
    <!-- Creator: David Marston -->
    <!-- Purpose: Test for id() with too many arguments. -->
    <!-- ExpectedException: id() should have one argument -->
  
  <xsl:template match="t04">
    <out>
      <xsl:value-of select="id('b','d')/@id"/>
    </out>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr20.xml
  
  Index: idkeyerr20.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <div allow="yes">
      <title>Introduction</title>
      <p>Intro Section.</p>
    </div>
    
    <div allow="yes">
      <title>Stylesheet Structure</title>
      <p>SS Section.</p>
    </div>
    
    <div allow="no">
      <title>Expressions</title>
      <p>Exp Section.</p>
    </div>
  </doc>
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr20.xsl
  
  Index: idkeyerr20.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
    <!-- FileName: idkeyerr20 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- VersionDrop: 1.1 will outlaw this trick. -->
    <!-- Creator: David Marston -->
    <!-- Section: 12.2 -->
    <!-- Purpose: Test for xsl:key that uses key() on a different keyspace in its match attribute. -->
  
  <xsl:key name="allowdiv" match="div" use="@allow"/>
  <xsl:key name="titles" match="key('allowdiv','yes')" use="title"/>
  
  <xsl:template match="doc">
   <root>
    <xsl:value-of select="key('titles', 'Introduction')/p"/>
    <xsl:value-of select="key('titles', 'Stylesheet Structure')/p"/>
    <!-- The next one is an empty node-set -->
    <xsl:value-of select="key('titles', 'Expressions')/p"/>
   </root>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-xalan/test/tests/conf/idkey/err/idkeyerr01.xml
  
  Index: idkeyerr01.xml
  ===================================================================
  <?xml version="1.0"?>
  <doc>
    <div>
      <title>Introduction</title>
      <p>Intro Section.</p>
    </div>
    
    <div>
      <title>Stylesheet Structure</title>
      <p>SS Section.</p>
    </div>
    
    <div>
      <title>Expressions</title>
      <p>Exp Section.</p>
    </div>
  </doc>