diff --exclude Makefile --exclude .memdump -Nwbrc libxslt-1.1.27/tests/docs/bug-688171-1.xml 688171-patch-libxslt-1.1.27/tests/docs/bug-688171-1.xml
*** libxslt-1.1.27/tests/docs/bug-688171-1.xml	1970-01-01 01:00:00.000000000 +0100
--- 688171-patch-libxslt-1.1.27/tests/docs/bug-688171-1.xml	2012-11-15 13:16:16.956822812 +0000
***************
*** 0 ****
--- 1,3 ----
+ <!DOCTYPE one>
+ <one>
+ </one>
diff --exclude Makefile --exclude .memdump -Nwbrc libxslt-1.1.27/tests/docs/bug-688171-2.xml 688171-patch-libxslt-1.1.27/tests/docs/bug-688171-2.xml
*** libxslt-1.1.27/tests/docs/bug-688171-2.xml	1970-01-01 01:00:00.000000000 +0100
--- 688171-patch-libxslt-1.1.27/tests/docs/bug-688171-2.xml	2012-11-15 13:16:21.284823817 +0000
***************
*** 0 ****
--- 1,3 ----
+ <!DOCTYPE two>
+ <two>
+ </two>
diff --exclude Makefile --exclude .memdump -Nwbrc libxslt-1.1.27/tests/docs/bug-688171.xml 688171-patch-libxslt-1.1.27/tests/docs/bug-688171.xml
*** libxslt-1.1.27/tests/docs/bug-688171.xml	1970-01-01 01:00:00.000000000 +0100
--- 688171-patch-libxslt-1.1.27/tests/docs/bug-688171.xml	2012-11-15 13:19:34.991897301 +0000
***************
*** 0 ****
--- 1,3 ----
+ <!DOCTYPE zero>
+ <zero>
+ </zero>
diff --exclude Makefile --exclude .memdump -Nwbrc libxslt-1.1.27/tests/docs/Makefile.am 688171-patch-libxslt-1.1.27/tests/docs/Makefile.am
*** libxslt-1.1.27/tests/docs/Makefile.am	2012-09-12 05:27:36.000000000 +0100
--- 688171-patch-libxslt-1.1.27/tests/docs/Makefile.am	2012-11-15 13:19:16.480893107 +0000
***************
*** 168,173 ****
--- 168,176 ----
  	bug-167.xml \
  	bug-168.xml \
  	bug-169.xml \
+ 	bug-688171.xml \
+ 	bug-688171-1.xml \
+ 	bug-688171-2.xml \
  	character.xml \
  	array.xml \
  	items.xml
diff --exclude Makefile --exclude .memdump -Nwbrc libxslt-1.1.27/tests/general/bug-688171.out 688171-patch-libxslt-1.1.27/tests/general/bug-688171.out
*** libxslt-1.1.27/tests/general/bug-688171.out	1970-01-01 01:00:00.000000000 +0100
--- 688171-patch-libxslt-1.1.27/tests/general/bug-688171.out	2012-11-15 14:02:16.651014684 +0000
***************
*** 0 ****
--- 1,2 ----
+ <?xml version="1.0"?>
+ Tests to ensure generate-id() generates unique IDs for different documents
diff --exclude Makefile --exclude .memdump -Nwbrc libxslt-1.1.27/tests/general/bug-688171.xsl 688171-patch-libxslt-1.1.27/tests/general/bug-688171.xsl
*** libxslt-1.1.27/tests/general/bug-688171.xsl	1970-01-01 01:00:00.000000000 +0100
--- 688171-patch-libxslt-1.1.27/tests/general/bug-688171.xsl	2012-11-15 14:01:22.239986942 +0000
***************
*** 0 ****
--- 1,34 ----
+ <?xml version="1.0" encoding="UTF-8"?>
+ 
+ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+ 
+     <xsl:template match="/">
+         <xsl:variable name="one">
+             <xsl:value-of select='generate-id(document("../docs/bug-688171-1.xml"))' />
+         </xsl:variable>
+         <xsl:variable name="two">
+             <xsl:value-of select='generate-id(document("../docs/bug-688171-2.xml"))' />
+         </xsl:variable>
+ 
+         <xsl:text>Tests to ensure generate-id() generates unique IDs for different documents</xsl:text>
+             
+         <xsl:if test='not($one = generate-id(document("../docs/bug-688171-1.xml")))'>
+             <xsl:text>Error: generate-id for the same document should be equal: </xsl:text>
+             <xsl:value-of select='$one' />
+         </xsl:if>
+ 
+         <xsl:if test='not($two = generate-id(document("../docs/bug-688171-2.xml")))'>
+             <xsl:text>Error: generate-id for the same document should be equal: </xsl:text>
+             <xsl:value-of select='$two' />
+         </xsl:if>
+ 
+         <xsl:if test='$one = $two'>
+             <xsl:text>Error: Two documents, but generate-id created: </xsl:text>
+             <xsl:value-of select='$one' />
+             <xsl:text> == </xsl:text>
+             <xsl:value-of select='$two' />
+         </xsl:if>
+ 
+     </xsl:template>
+ 
+ </xsl:stylesheet>
diff --exclude Makefile --exclude .memdump -Nwbrc libxslt-1.1.27/tests/general/Makefile.am 688171-patch-libxslt-1.1.27/tests/general/Makefile.am
*** libxslt-1.1.27/tests/general/Makefile.am	2012-09-12 05:27:37.000000000 +0100
--- 688171-patch-libxslt-1.1.27/tests/general/Makefile.am	2012-11-15 13:18:55.754888431 +0000
***************
*** 186,191 ****
--- 186,192 ----
      bug-176.out bug-176.xsl \
      bug-177.out bug-177.xsl \
      bug-178.out bug-178.xsl \
+     bug-688171.out bug-688171.xsl \
      character.out character.xsl \
      character2.out character2.xsl \
      itemschoose.out itemschoose.xsl \
