mirror of
				https://gitlab.gnome.org/GNOME/libxslt
				synced 2025-11-04 00:53:12 +03:00 
			
		
		
		
	Add xsl:attribute-set regression tests
This commit is contained in:
		
							
								
								
									
										1
									
								
								tests/docs/bug-188.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								tests/docs/bug-188.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
<doc/>
 | 
			
		||||
							
								
								
									
										1
									
								
								tests/docs/bug-189.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								tests/docs/bug-189.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
<doc/>
 | 
			
		||||
							
								
								
									
										1
									
								
								tests/docs/bug-190.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								tests/docs/bug-190.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
<doc/>
 | 
			
		||||
							
								
								
									
										1
									
								
								tests/docs/bug-191.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								tests/docs/bug-191.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
<doc/>
 | 
			
		||||
							
								
								
									
										0
									
								
								tests/general/bug-188-imp.out
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								tests/general/bug-188-imp.out
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										8
									
								
								tests/general/bug-188-imp.xsl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								tests/general/bug-188-imp.xsl
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
			
		||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 | 
			
		||||
 | 
			
		||||
  <xsl:attribute-set name="set">
 | 
			
		||||
    <xsl:attribute name="attr">BAD</xsl:attribute>
 | 
			
		||||
    <xsl:attribute name="other">BAD</xsl:attribute>
 | 
			
		||||
  </xsl:attribute-set>
 | 
			
		||||
 | 
			
		||||
</xsl:stylesheet>
 | 
			
		||||
							
								
								
									
										4
									
								
								tests/general/bug-188.out
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								tests/general/bug-188.out
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
<?xml version="1.0"?>
 | 
			
		||||
<result>
 | 
			
		||||
  <elem other="GOOD" attr="GOOD"/>
 | 
			
		||||
</result>
 | 
			
		||||
							
								
								
									
										20
									
								
								tests/general/bug-188.xsl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								tests/general/bug-188.xsl
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
			
		||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 | 
			
		||||
 | 
			
		||||
  <xsl:import href="bug-188-imp.xsl"/>
 | 
			
		||||
  <xsl:output indent="yes"/>
 | 
			
		||||
 | 
			
		||||
  <xsl:template match="/">
 | 
			
		||||
    <result>
 | 
			
		||||
      <xsl:element name="elem" use-attribute-sets="set"/>
 | 
			
		||||
    </result>
 | 
			
		||||
  </xsl:template>
 | 
			
		||||
 | 
			
		||||
  <xsl:attribute-set name="set" use-attribute-sets="used">
 | 
			
		||||
    <xsl:attribute name="other">GOOD</xsl:attribute>
 | 
			
		||||
  </xsl:attribute-set>
 | 
			
		||||
 | 
			
		||||
  <xsl:attribute-set name="used">
 | 
			
		||||
    <xsl:attribute name="attr">GOOD</xsl:attribute>
 | 
			
		||||
  </xsl:attribute-set>
 | 
			
		||||
 | 
			
		||||
</xsl:stylesheet>
 | 
			
		||||
							
								
								
									
										5
									
								
								tests/general/bug-189.out
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								tests/general/bug-189.out
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
<?xml version="1.0"?>
 | 
			
		||||
<result>
 | 
			
		||||
  <elem att1="1" commonatt="2" att2="2"/>
 | 
			
		||||
  <elem att3a="2" att3b="2"/>
 | 
			
		||||
</result>
 | 
			
		||||
							
								
								
									
										25
									
								
								tests/general/bug-189.xsl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								tests/general/bug-189.xsl
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,25 @@
 | 
			
		||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
 | 
			
		||||
  <xsl:output indent="yes"/>
 | 
			
		||||
  <xsl:template match="/">
 | 
			
		||||
    <result>
 | 
			
		||||
      <elem xsl:use-attribute-sets="att1 att2"/>
 | 
			
		||||
      <elem xsl:use-attribute-sets="att3"/>
 | 
			
		||||
    </result>
 | 
			
		||||
  </xsl:template>
 | 
			
		||||
  <xsl:attribute-set name="att1">
 | 
			
		||||
    <xsl:attribute name="att1">1</xsl:attribute>
 | 
			
		||||
    <xsl:attribute name="commonatt">1</xsl:attribute>
 | 
			
		||||
  </xsl:attribute-set>
 | 
			
		||||
  <xsl:attribute-set name="att2">
 | 
			
		||||
    <xsl:attribute name="att2">2</xsl:attribute>
 | 
			
		||||
    <xsl:attribute name="commonatt">2</xsl:attribute>
 | 
			
		||||
  </xsl:attribute-set>
 | 
			
		||||
  <xsl:attribute-set name="att3">
 | 
			
		||||
    <xsl:attribute name="att3a">1</xsl:attribute>
 | 
			
		||||
    <xsl:attribute name="att3a">2</xsl:attribute>
 | 
			
		||||
    <xsl:attribute name="att3b">1</xsl:attribute>
 | 
			
		||||
  </xsl:attribute-set>
 | 
			
		||||
  <xsl:attribute-set name="att3">
 | 
			
		||||
    <xsl:attribute name="att3b">2</xsl:attribute>
 | 
			
		||||
  </xsl:attribute-set>
 | 
			
		||||
</xsl:stylesheet>
 | 
			
		||||
							
								
								
									
										0
									
								
								tests/general/bug-190-imp.out
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								tests/general/bug-190-imp.out
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										10
									
								
								tests/general/bug-190-imp.xsl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								tests/general/bug-190-imp.xsl
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
			
		||||
<xsl:stylesheet
 | 
			
		||||
  version="1.0"
 | 
			
		||||
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 | 
			
		||||
  xmlns:ns2="urn:foo">
 | 
			
		||||
 | 
			
		||||
  <xsl:attribute-set name="ns2:set">
 | 
			
		||||
    <xsl:attribute name="attr">value</xsl:attribute>
 | 
			
		||||
  </xsl:attribute-set>
 | 
			
		||||
 | 
			
		||||
</xsl:stylesheet>
 | 
			
		||||
							
								
								
									
										4
									
								
								tests/general/bug-190.out
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								tests/general/bug-190.out
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
<?xml version="1.0"?>
 | 
			
		||||
<result>
 | 
			
		||||
  <elem attr="value"/>
 | 
			
		||||
</result>
 | 
			
		||||
							
								
								
									
										16
									
								
								tests/general/bug-190.xsl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								tests/general/bug-190.xsl
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,16 @@
 | 
			
		||||
<xsl:stylesheet
 | 
			
		||||
  version="1.0"
 | 
			
		||||
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 | 
			
		||||
  xmlns:ns1="urn:foo"
 | 
			
		||||
  exclude-result-prefixes="ns1">
 | 
			
		||||
 | 
			
		||||
  <xsl:import href="bug-190-imp.xsl"/>
 | 
			
		||||
  <xsl:output indent="yes"/>
 | 
			
		||||
 | 
			
		||||
  <xsl:template match="/">
 | 
			
		||||
    <result>
 | 
			
		||||
      <elem xsl:use-attribute-sets="ns1:set"/>
 | 
			
		||||
    </result>
 | 
			
		||||
  </xsl:template>
 | 
			
		||||
 | 
			
		||||
</xsl:stylesheet>
 | 
			
		||||
							
								
								
									
										0
									
								
								tests/general/bug-191-imp.out
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								tests/general/bug-191-imp.out
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										8
									
								
								tests/general/bug-191-imp.xsl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								tests/general/bug-191-imp.xsl
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
			
		||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
 | 
			
		||||
  <xsl:attribute-set name="att2" use-attribute-sets="att3">
 | 
			
		||||
    <xsl:attribute name="att2">2</xsl:attribute>
 | 
			
		||||
  </xsl:attribute-set>
 | 
			
		||||
  <xsl:attribute-set name="att3" use-attribute-sets="att1">
 | 
			
		||||
    <xsl:attribute name="att3">3</xsl:attribute>
 | 
			
		||||
  </xsl:attribute-set>
 | 
			
		||||
</xsl:stylesheet>
 | 
			
		||||
							
								
								
									
										2
									
								
								tests/general/bug-191.err
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								tests/general/bug-191.err
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,2 @@
 | 
			
		||||
compilation error
 | 
			
		||||
xsl:attribute-set : use-attribute-sets recursion detected on att1
 | 
			
		||||
							
								
								
									
										0
									
								
								tests/general/bug-191.out
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								tests/general/bug-191.out
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										9
									
								
								tests/general/bug-191.xsl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								tests/general/bug-191.xsl
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
 | 
			
		||||
  <xsl:import href="bug-191-imp.xsl"/>
 | 
			
		||||
  <xsl:template match="/">
 | 
			
		||||
    <b xsl:use-attribute-sets="att1"/>
 | 
			
		||||
  </xsl:template>
 | 
			
		||||
  <xsl:attribute-set name="att1" use-attribute-sets="att2">
 | 
			
		||||
    <xsl:attribute name="att1">1</xsl:attribute>
 | 
			
		||||
  </xsl:attribute-set>
 | 
			
		||||
</xsl:stylesheet>
 | 
			
		||||
		Reference in New Issue
	
	Block a user