You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by am...@apache.org on 2001/06/14 15:54:12 UTC

cvs commit: xml-xalan/test/tests/conf/attribset attribset42.xml attribset42.xsl

amiro       01/06/14 06:54:12

  Added:       test/tests/conf/attribset attribset42.xml attribset42.xsl
  Log:
  Obtained from: Morten Jorgensen
  Submitted by: Tom Amiro
  Reviewed by: Dave Marston
  New test from Morten to test that when two attribute set elements share the
  same name, effectively making up a single attribute set, the last
  definition of an attribute should take precedence.
  
  Revision  Changes    Path
  1.1                  xml-xalan/test/tests/conf/attribset/attribset42.xml
  
  Index: attribset42.xml
  ===================================================================
  <?xml version="1.0"?> 
  
  <doc>
    <foo>a</foo>
  </doc>
  
  
  
  1.1                  xml-xalan/test/tests/conf/attribset/attribset42.xsl
  
  Index: attribset42.xsl
  ===================================================================
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  
  <xsl:output indent="yes"/>
  
    <!-- FileName: attribset42 -->
    <!-- Document: http://www.w3.org/TR/xslt -->
    <!-- DocVersion: 19991116 -->
    <!-- Section: 7.1.4 Named Attribute Sets -->
    <!-- Creator: Morten Jorgensen -->
    <!-- Purpose: Test inheritance of attribute sets. A literal result element
                  is referring an attribute set that is defined by two separate
                  <xsl:attribute-set.../> elements with the same name. Both
                  these elements have a use-attribute-sets attribute, which
                  means that we have a single attribute set that inherits from
                  two other attribute sets. Both parents attribute sets have
                  attributes that are overridden by the child.-->
  
  <xsl:template match="/">
    <out xsl:use-attribute-sets="child">
      <xsl:attribute name="location">Wonderland</xsl:attribute>
    </out>
  </xsl:template>
  
  <xsl:attribute-set name="child" use-attribute-sets="alice">
    <xsl:attribute name="follow">yellowbrickroad</xsl:attribute>
    <xsl:attribute name="rabbithole">shallow</xsl:attribute>
  </xsl:attribute-set>
  
  <xsl:attribute-set name="child" use-attribute-sets="rabbit">
    <xsl:attribute name="follow">theleader</xsl:attribute>
    <xsl:attribute name="alice">intoxicated</xsl:attribute>
  </xsl:attribute-set>
  
  <xsl:attribute-set name="rabbit">
    <xsl:attribute name="rabbithole">deep</xsl:attribute>
  </xsl:attribute-set>
  
  <xsl:attribute-set name="alice">
    <xsl:attribute name="alice">ondrugs</xsl:attribute>
  </xsl:attribute-set>
  
  </xsl:stylesheet>
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org