mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2024-12-25 23:21:26 +03:00
C14N tests integrated into LibXML2 test suite
* Makefile.am result/c14n/* test/c14n/*: C14N tests integrated into LibXML2 test suite
This commit is contained in:
parent
e2c7dcedcd
commit
508a1019a6
@ -1,3 +1,8 @@
|
||||
Thu May 30 23:34:27 2002 Aleksey Sanin <aleksey@aleksey.com>
|
||||
|
||||
* Makefile.am result/c14n/* test/c14n/*: C14N tests integrated
|
||||
into LibXML2 test suite
|
||||
|
||||
Thu May 30 21:23:06 2002 Aleksey Sanin <aleksey@aleksey.com>
|
||||
|
||||
* c14n.c: propagating xpath ancesstors node fix to c14n
|
||||
|
34
Makefile.am
34
Makefile.am
@ -106,7 +106,7 @@ check-local: tests
|
||||
|
||||
testall : tests SVGtests SAXtests
|
||||
|
||||
tests: XMLtests XMLenttests HTMLtests Validtests URItests XPathtests XPtrtests XIncludetests Scripttests Catatests @TEST_SCHEMAS@ @TEST_THREADS@
|
||||
tests: XMLtests XMLenttests HTMLtests Validtests URItests XPathtests XPtrtests XIncludetests C14Ntests Scripttests Catatests @TEST_SCHEMAS@ @TEST_THREADS@
|
||||
@(cd python ; $(MAKE) tests)
|
||||
|
||||
valgrind:
|
||||
@ -611,6 +611,38 @@ Automatatests: testAutomata$(EXEEXT)
|
||||
rm result.$$name ; \
|
||||
fi ; fi ; done)
|
||||
|
||||
C14Ntests : testC14N$(EXEEXT)
|
||||
-@(for m in with-comments without-comments exc-without-comments ; do \
|
||||
echo "##"; \
|
||||
echo "## C14N tests: $$m"; \
|
||||
echo "##"; \
|
||||
for i in $(srcdir)/test/c14n/$$m/*.xml ; do \
|
||||
if [ ! -d $$i ] ; then \
|
||||
name=`basename $$i .xml`; \
|
||||
echo $$name; \
|
||||
if [ -e $(srcdir)/test/c14n/$$m/$$name.xpath ] ; then \
|
||||
xpathFile=$(srcdir)/test/c14n/$$m/$$name.xpath; \
|
||||
else \
|
||||
xpathFile=""; \
|
||||
fi; \
|
||||
if [ -e $(srcdir)/test/c14n/$$m/$$name.ns ] ; then \
|
||||
nsList=`cat $(srcdir)/test/c14n/$$m/$$name.ns`; \
|
||||
else \
|
||||
nsList=""; \
|
||||
fi; \
|
||||
$(CHECKER) $(top_builddir)/testC14N --$$m $$i $$xpathFile $$nsList > $(srcdir)/test/c14n/test.tmp; \
|
||||
if [ $$? -eq 0 ]; then \
|
||||
diff $(srcdir)/result/c14n/$$m/$$name $(srcdir)/test/c14n/test.tmp ; \
|
||||
if [ $$? -ne 0 ]; then \
|
||||
echo "Test failed"; \
|
||||
fi; \
|
||||
else \
|
||||
echo "C14N failed"; \
|
||||
fi; \
|
||||
fi; \
|
||||
rm -f $(srcdir)/test/c14n/test.tmp; \
|
||||
done; \
|
||||
done)
|
||||
|
||||
Schemastests: testSchemas$(EXEEXT)
|
||||
@(echo > .memdump)
|
||||
|
7
result/c14n/exc-without-comments/test-0
Normal file
7
result/c14n/exc-without-comments/test-0
Normal file
@ -0,0 +1,7 @@
|
||||
<e6 test="../baz">
|
||||
<e7 xmlns="http://www.ietf.org">
|
||||
<e8 xmlns="" xmlns:a="http://www.w3.org" a:foo="bar">
|
||||
<e9 attr="default"></e9>
|
||||
</e8>
|
||||
</e7>
|
||||
</e6>
|
7
result/c14n/exc-without-comments/test-1
Normal file
7
result/c14n/exc-without-comments/test-1
Normal file
@ -0,0 +1,7 @@
|
||||
<e6 xmlns:a="http://www.w3.org" test="../baz">
|
||||
<e7 xmlns="http://www.ietf.org">
|
||||
<e8 xmlns="" a:foo="bar">
|
||||
<e9 xmlns:a="http://www.ietf.org" attr="default"></e9>
|
||||
</e8>
|
||||
</e7>
|
||||
</e6>
|
6
result/c14n/with-comments/example-1
Normal file
6
result/c14n/with-comments/example-1
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml-stylesheet href="doc.xsl"
|
||||
type="text/xsl" ?>
|
||||
<doc>Hello, world!<!-- Comment 1 --></doc>
|
||||
<?pi-without-data?>
|
||||
<!-- Comment 2 -->
|
||||
<!-- Comment 3 -->
|
11
result/c14n/with-comments/example-2
Normal file
11
result/c14n/with-comments/example-2
Normal file
@ -0,0 +1,11 @@
|
||||
<doc>
|
||||
<clean> </clean>
|
||||
<dirty> A B </dirty>
|
||||
<mixed>
|
||||
A
|
||||
<clean> </clean>
|
||||
B
|
||||
<dirty> A B </dirty>
|
||||
C
|
||||
</mixed>
|
||||
</doc>
|
14
result/c14n/with-comments/example-3
Normal file
14
result/c14n/with-comments/example-3
Normal file
@ -0,0 +1,14 @@
|
||||
<doc>
|
||||
<e1></e1>
|
||||
<e2></e2>
|
||||
<e3 id="elem3" name="elem3"></e3>
|
||||
<e4 id="elem4" name="elem4"></e4>
|
||||
<e5 xmlns="http://www.uvic.ca" xmlns:a="http://www.w3.org" xmlns:b="http://www.ietf.org" attr="I'm" attr2="all" b:attr="sorted" a:attr="out"></e5>
|
||||
<e6 xmlns:a="http://www.w3.org">
|
||||
<e7 xmlns="http://www.ietf.org">
|
||||
<e8 xmlns="">
|
||||
<e9 xmlns:a="http://www.ietf.org" attr="default"></e9>
|
||||
</e8>
|
||||
</e7>
|
||||
</e6>
|
||||
</doc>
|
4
result/c14n/with-comments/example-5
Normal file
4
result/c14n/with-comments/example-5
Normal file
@ -0,0 +1,4 @@
|
||||
<doc attrExtEnt="entExt">
|
||||
Hello, world!
|
||||
</doc>
|
||||
<!-- Let world.txt contain "world" (excluding the quotes) -->
|
1
result/c14n/with-comments/example-6
Normal file
1
result/c14n/with-comments/example-6
Normal file
@ -0,0 +1 @@
|
||||
<doc>©</doc>
|
1
result/c14n/with-comments/example-7
Normal file
1
result/c14n/with-comments/example-7
Normal file
@ -0,0 +1 @@
|
||||
<e1 xmlns="http://www.ietf.org" xmlns:w3c="http://www.w3.org"><e3 xmlns="" id="E3" xml:space="preserve"></e3></e1>
|
4
result/c14n/without-comments/example-1
Normal file
4
result/c14n/without-comments/example-1
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml-stylesheet href="doc.xsl"
|
||||
type="text/xsl" ?>
|
||||
<doc>Hello, world!</doc>
|
||||
<?pi-without-data?>
|
11
result/c14n/without-comments/example-2
Normal file
11
result/c14n/without-comments/example-2
Normal file
@ -0,0 +1,11 @@
|
||||
<doc>
|
||||
<clean> </clean>
|
||||
<dirty> A B </dirty>
|
||||
<mixed>
|
||||
A
|
||||
<clean> </clean>
|
||||
B
|
||||
<dirty> A B </dirty>
|
||||
C
|
||||
</mixed>
|
||||
</doc>
|
14
result/c14n/without-comments/example-3
Normal file
14
result/c14n/without-comments/example-3
Normal file
@ -0,0 +1,14 @@
|
||||
<doc>
|
||||
<e1></e1>
|
||||
<e2></e2>
|
||||
<e3 id="elem3" name="elem3"></e3>
|
||||
<e4 id="elem4" name="elem4"></e4>
|
||||
<e5 xmlns="http://www.uvic.ca" xmlns:a="http://www.w3.org" xmlns:b="http://www.ietf.org" attr="I'm" attr2="all" b:attr="sorted" a:attr="out"></e5>
|
||||
<e6 xmlns:a="http://www.w3.org">
|
||||
<e7 xmlns="http://www.ietf.org">
|
||||
<e8 xmlns="">
|
||||
<e9 xmlns:a="http://www.ietf.org" attr="default"></e9>
|
||||
</e8>
|
||||
</e7>
|
||||
</e6>
|
||||
</doc>
|
3
result/c14n/without-comments/example-5
Normal file
3
result/c14n/without-comments/example-5
Normal file
@ -0,0 +1,3 @@
|
||||
<doc attrExtEnt="entExt">
|
||||
Hello, world!
|
||||
</doc>
|
1
result/c14n/without-comments/example-6
Normal file
1
result/c14n/without-comments/example-6
Normal file
@ -0,0 +1 @@
|
||||
<doc>©</doc>
|
1
result/c14n/without-comments/example-7
Normal file
1
result/c14n/without-comments/example-7
Normal file
@ -0,0 +1 @@
|
||||
<e1 xmlns="http://www.ietf.org" xmlns:w3c="http://www.w3.org"><e3 xmlns="" id="E3" xml:space="preserve"></e3></e1>
|
1
result/c14n/without-comments/test-0
Normal file
1
result/c14n/without-comments/test-0
Normal file
@ -0,0 +1 @@
|
||||
I am the text.
|
31
result/c14n/without-comments/test-1
Normal file
31
result/c14n/without-comments/test-1
Normal file
@ -0,0 +1,31 @@
|
||||
<X509Data xmlns="http://www.w3.org/2000/09/xmldsig#">
|
||||
<X509SubjectName>
|
||||
CN=Merlin Hughes,O=Baltimore Technologies\, Ltd.,ST=Dublin,C=IE
|
||||
</X509SubjectName>
|
||||
<X509IssuerSerial>
|
||||
<X509IssuerName>
|
||||
CN=Test DSA CA,O=Baltimore Technologies\, Ltd.,ST=Dublin,C=IE
|
||||
</X509IssuerName>
|
||||
<X509SerialNumber>970849936</X509SerialNumber>
|
||||
</X509IssuerSerial>
|
||||
<X509Certificate>
|
||||
MIIDNzCCAvWgAwIBAgIEOd3+kDAJBgcqhkjOOAQDMFsxCzAJBgNVBAYTAklFMQ8w
|
||||
DQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9yZSBUZWNobm9sb2dpZXMs
|
||||
IEx0ZC4xFDASBgNVBAMTC1Rlc3QgRFNBIENBMB4XDTAwMTAwNjE2MzIxNVoXDTAx
|
||||
MTAwNjE2MzIxNFowXTELMAkGA1UEBhMCSUUxDzANBgNVBAgTBkR1YmxpbjElMCMG
|
||||
A1UEChMcQmFsdGltb3JlIFRlY2hub2xvZ2llcywgTHRkLjEWMBQGA1UEAxMNTWVy
|
||||
bGluIEh1Z2hlczCCAbYwggErBgcqhkjOOAQBMIIBHgKBgQDaJjfDTrawMHf8MiUt
|
||||
Y54b37hSmYNnR3KpGT10uU1Dqppcju06uN0iGbqf947DjkBC25hKnqykK31xBw0E
|
||||
CPbYq/KC98kghdf2xJCu6B8aqJ95K9jdVflJ3WP7PQxJn+fmM23zy6HYLXVICpfq
|
||||
etdNj/VHCShZE3bdJiE6VobSFQIVAPQecqS2PaTDprcQnkwx4MHTRXhrAoGAMuGA
|
||||
lqeB1ax+vyO2+Osubjhl7pHxLu47RIH+/M52DjESA9KMSrwzsYx8yNR2WooByrE0
|
||||
t6fu0VncK7UK8olO4t7wpv2z4AFQPRVCKFwo0qgn5aKIkICGMlrRy81avb27wGcW
|
||||
othx3iPPMtFXtoDqK0JItaI9R8zc1msFhM1GKMYDgYQAAoGActA8YGxrtngg/zKV
|
||||
vqEOefnwmViFztcnPBYPlJsvh6yKI4iDm68fnp4Mi3RrJ6bZAygFrUIQLxLjV+OJ
|
||||
tgJAEto0xAs+Mehuq1DkSFEpP3oDzCTOsrOiS1DwQe4oIb7zVk/9l7aPtJMHW0LV
|
||||
lMdwZNFNNJoqMcT2ZfCPrfvYvQ2jRzBFMB4GA1UdEQQXMBWBE21lcmxpbkBiYWx0
|
||||
aW1vcmUuaWUwDgYDVR0PAQH/BAQDAgeAMBMGA1UdIwQMMAqACEJZQG0KwRbPMAkG
|
||||
ByqGSM44BAMDMQAwLgIVAK4skWEFYgrggaJA8vYAwSjg12+KAhUAwHTo7wd4tENw
|
||||
9LAKPklQ/74fH18=
|
||||
</X509Certificate>
|
||||
</X509Data>
|
3
result/c14n/without-comments/test-2
Normal file
3
result/c14n/without-comments/test-2
Normal file
@ -0,0 +1,3 @@
|
||||
<n1:elem2 xmlns:n0="foo://bar" xmlns:n1="http://example.net" xmlns:n3="ftp://example.org" xml:lang="en">
|
||||
<n3:stuff></n3:stuff>
|
||||
</n1:elem2>
|
7
result/c14n/without-comments/test-3
Normal file
7
result/c14n/without-comments/test-3
Normal file
@ -0,0 +1,7 @@
|
||||
<e6 xmlns:a="http://www.w3.org" xmlns:foo="http://www.bar.org" test="../baz" xml:base="http://www.example.org/2002/">
|
||||
<e7 xmlns="http://www.ietf.org">
|
||||
<e8 xmlns="" a:foo="bar">
|
||||
<e9 xmlns:a="http://www.ietf.org" attr="default"></e9>
|
||||
</e8>
|
||||
</e7>
|
||||
</e6>
|
18
test/c14n/exc-without-comments/test-0.xml
Normal file
18
test/c14n/exc-without-comments/test-0.xml
Normal file
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE doc [<!ATTLIST e9 attr CDATA "default">]>
|
||||
<doc xmlns:foo="http://www.bar.org" xml:base="http://www.example.org/2002/">
|
||||
<e1 />
|
||||
<e2 ></e2>
|
||||
<e3 name = "elem3" id="elem3" />
|
||||
<e4 name="elem4" id="elem4" ></e4>
|
||||
<e5 a:attr="out" b:attr="sorted" attr2="all" attr="I'm"
|
||||
xmlns:b="http://www.ietf.org"
|
||||
xmlns:a="http://www.w3.org"
|
||||
xmlns="http://example.org"/>
|
||||
<e6 xmlns="" test="../baz" xmlns:a="http://www.w3.org">
|
||||
<e7 xmlns="http://www.ietf.org">
|
||||
<e8 xmlns="" xmlns:a="http://www.w3.org" a:foo="bar">
|
||||
<e9 xmlns="" xmlns:a="http://www.ietf.org"/>
|
||||
</e8>
|
||||
</e7>
|
||||
</e6>
|
||||
</doc>
|
3
test/c14n/exc-without-comments/test-0.xpath
Normal file
3
test/c14n/exc-without-comments/test-0.xpath
Normal file
@ -0,0 +1,3 @@
|
||||
<XPath>
|
||||
(//. | //@* | //namespace::*)[ancestor-or-self::e6]
|
||||
</XPath>
|
1
test/c14n/exc-without-comments/test-1.ns
Normal file
1
test/c14n/exc-without-comments/test-1.ns
Normal file
@ -0,0 +1 @@
|
||||
a
|
18
test/c14n/exc-without-comments/test-1.xml
Normal file
18
test/c14n/exc-without-comments/test-1.xml
Normal file
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE doc [<!ATTLIST e9 attr CDATA "default">]>
|
||||
<doc xmlns:foo="http://www.bar.org" xml:base="http://www.example.org/2002/">
|
||||
<e1 />
|
||||
<e2 ></e2>
|
||||
<e3 name = "elem3" id="elem3" />
|
||||
<e4 name="elem4" id="elem4" ></e4>
|
||||
<e5 a:attr="out" b:attr="sorted" attr2="all" attr="I'm"
|
||||
xmlns:b="http://www.ietf.org"
|
||||
xmlns:a="http://www.w3.org"
|
||||
xmlns="http://example.org"/>
|
||||
<e6 xmlns="" test="../baz" xmlns:a="http://www.w3.org">
|
||||
<e7 xmlns="http://www.ietf.org">
|
||||
<e8 xmlns="" xmlns:a="http://www.w3.org" a:foo="bar">
|
||||
<e9 xmlns="" xmlns:a="http://www.ietf.org"/>
|
||||
</e8>
|
||||
</e7>
|
||||
</e6>
|
||||
</doc>
|
3
test/c14n/exc-without-comments/test-1.xpath
Normal file
3
test/c14n/exc-without-comments/test-1.xpath
Normal file
@ -0,0 +1,3 @@
|
||||
<XPath>
|
||||
(//. | //@* | //namespace::*)[ancestor-or-self::e6]
|
||||
</XPath>
|
0
test/c14n/with-comments/doc.dtd
Normal file
0
test/c14n/with-comments/doc.dtd
Normal file
14
test/c14n/with-comments/example-1.xml
Normal file
14
test/c14n/with-comments/example-1.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<?xml-stylesheet href="doc.xsl"
|
||||
type="text/xsl" ?>
|
||||
|
||||
<!DOCTYPE doc SYSTEM "doc.dtd">
|
||||
|
||||
<doc>Hello, world!<!-- Comment 1 --></doc>
|
||||
|
||||
<?pi-without-data ?>
|
||||
|
||||
<!-- Comment 2 -->
|
||||
|
||||
<!-- Comment 3 -->
|
11
test/c14n/with-comments/example-2.xml
Normal file
11
test/c14n/with-comments/example-2.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<doc>
|
||||
<clean> </clean>
|
||||
<dirty> A B </dirty>
|
||||
<mixed>
|
||||
A
|
||||
<clean> </clean>
|
||||
B
|
||||
<dirty> A B </dirty>
|
||||
C
|
||||
</mixed>
|
||||
</doc>
|
18
test/c14n/with-comments/example-3.xml
Normal file
18
test/c14n/with-comments/example-3.xml
Normal file
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE doc [<!ATTLIST e9 attr CDATA "default">]>
|
||||
<doc>
|
||||
<e1 />
|
||||
<e2 ></e2>
|
||||
<e3 name = "elem3" id="elem3" />
|
||||
<e4 name="elem4" id="elem4" ></e4>
|
||||
<e5 a:attr="out" b:attr="sorted" attr2="all" attr="I'm"
|
||||
xmlns:b="http://www.ietf.org"
|
||||
xmlns:a="http://www.w3.org"
|
||||
xmlns="http://www.uvic.ca"/>
|
||||
<e6 xmlns="" xmlns:a="http://www.w3.org">
|
||||
<e7 xmlns="http://www.ietf.org">
|
||||
<e8 xmlns="" xmlns:a="http://www.w3.org">
|
||||
<e9 xmlns="" xmlns:a="http://www.ietf.org"/>
|
||||
</e8>
|
||||
</e7>
|
||||
</e6>
|
||||
</doc>
|
9
test/c14n/with-comments/example-4.xml
Normal file
9
test/c14n/with-comments/example-4.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<!DOCTYPE doc [<!ATTLIST normId id ID #IMPLIED>]>
|
||||
<doc>
|
||||
<text>First line
 Second line</text>
|
||||
<value>2</value>
|
||||
<compute><![CDATA[value>"0" && value<"10" ?"valid":"error"]]></compute>
|
||||
<compute expr='value>"0" && value<"10" ?"valid":"error"'>valid</compute>
|
||||
<norm attr=' '   
	 ' '/>
|
||||
<normId id=' '   
	 ' '/>
|
||||
</doc>
|
12
test/c14n/with-comments/example-5.xml
Normal file
12
test/c14n/with-comments/example-5.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE doc [
|
||||
<!ATTLIST doc attrExtEnt ENTITY #IMPLIED>
|
||||
<!ENTITY ent1 "Hello">
|
||||
<!ENTITY ent2 SYSTEM "world.txt">
|
||||
<!ENTITY entExt SYSTEM "earth.gif" NDATA gif>
|
||||
<!NOTATION gif SYSTEM "viewgif.exe">
|
||||
]>
|
||||
<doc attrExtEnt="entExt">
|
||||
&ent1;, &ent2;!
|
||||
</doc>
|
||||
|
||||
<!-- Let world.txt contain "world" (excluding the quotes) -->
|
2
test/c14n/with-comments/example-6.xml
Normal file
2
test/c14n/with-comments/example-6.xml
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<doc>©</doc>
|
11
test/c14n/with-comments/example-7.xml
Normal file
11
test/c14n/with-comments/example-7.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE doc [
|
||||
<!ATTLIST e2 xml:space (default|preserve) 'preserve'>
|
||||
<!ATTLIST e3 id ID #IMPLIED>
|
||||
]>
|
||||
<doc xmlns="http://www.ietf.org" xmlns:w3c="http://www.w3.org">
|
||||
<e1>
|
||||
<e2 xmlns="">
|
||||
<e3 id="E3"/>
|
||||
</e2>
|
||||
</e1>
|
||||
</doc>
|
10
test/c14n/with-comments/example-7.xpath
Normal file
10
test/c14n/with-comments/example-7.xpath
Normal file
@ -0,0 +1,10 @@
|
||||
<XPath xmlns:ietf="http://www.ietf.org" >
|
||||
(//.|//@*|//namespace::*)
|
||||
[
|
||||
self::ietf:e1
|
||||
or
|
||||
(parent::ietf:e1 and not(self::text() or self::e2))
|
||||
or
|
||||
count(id("E3")|ancestor-or-self::node()) = count(ancestor-or-self::node())
|
||||
]
|
||||
</XPath>
|
1
test/c14n/with-comments/world.txt
Normal file
1
test/c14n/with-comments/world.txt
Normal file
@ -0,0 +1 @@
|
||||
world
|
0
test/c14n/without-comments/doc.dtd
Normal file
0
test/c14n/without-comments/doc.dtd
Normal file
14
test/c14n/without-comments/example-1.xml
Normal file
14
test/c14n/without-comments/example-1.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<?xml-stylesheet href="doc.xsl"
|
||||
type="text/xsl" ?>
|
||||
|
||||
<!DOCTYPE doc SYSTEM "doc.dtd">
|
||||
|
||||
<doc>Hello, world!<!-- Comment 1 --></doc>
|
||||
|
||||
<?pi-without-data ?>
|
||||
|
||||
<!-- Comment 2 -->
|
||||
|
||||
<!-- Comment 3 -->
|
11
test/c14n/without-comments/example-2.xml
Normal file
11
test/c14n/without-comments/example-2.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<doc>
|
||||
<clean> </clean>
|
||||
<dirty> A B </dirty>
|
||||
<mixed>
|
||||
A
|
||||
<clean> </clean>
|
||||
B
|
||||
<dirty> A B </dirty>
|
||||
C
|
||||
</mixed>
|
||||
</doc>
|
18
test/c14n/without-comments/example-3.xml
Normal file
18
test/c14n/without-comments/example-3.xml
Normal file
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE doc [<!ATTLIST e9 attr CDATA "default">]>
|
||||
<doc>
|
||||
<e1 />
|
||||
<e2 ></e2>
|
||||
<e3 name = "elem3" id="elem3" />
|
||||
<e4 name="elem4" id="elem4" ></e4>
|
||||
<e5 a:attr="out" b:attr="sorted" attr2="all" attr="I'm"
|
||||
xmlns:b="http://www.ietf.org"
|
||||
xmlns:a="http://www.w3.org"
|
||||
xmlns="http://www.uvic.ca"/>
|
||||
<e6 xmlns="" xmlns:a="http://www.w3.org">
|
||||
<e7 xmlns="http://www.ietf.org">
|
||||
<e8 xmlns="" xmlns:a="http://www.w3.org">
|
||||
<e9 xmlns="" xmlns:a="http://www.ietf.org"/>
|
||||
</e8>
|
||||
</e7>
|
||||
</e6>
|
||||
</doc>
|
9
test/c14n/without-comments/example-4.xml
Normal file
9
test/c14n/without-comments/example-4.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<!DOCTYPE doc [<!ATTLIST normId id ID #IMPLIED>]>
|
||||
<doc>
|
||||
<text>First line
 Second line</text>
|
||||
<value>2</value>
|
||||
<compute><![CDATA[value>"0" && value<"10" ?"valid":"error"]]></compute>
|
||||
<compute expr='value>"0" && value<"10" ?"valid":"error"'>valid</compute>
|
||||
<norm attr=' '   
	 ' '/>
|
||||
<normId id=' '   
	 ' '/>
|
||||
</doc>
|
12
test/c14n/without-comments/example-5.xml
Normal file
12
test/c14n/without-comments/example-5.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE doc [
|
||||
<!ATTLIST doc attrExtEnt ENTITY #IMPLIED>
|
||||
<!ENTITY ent1 "Hello">
|
||||
<!ENTITY ent2 SYSTEM "world.txt">
|
||||
<!ENTITY entExt SYSTEM "earth.gif" NDATA gif>
|
||||
<!NOTATION gif SYSTEM "viewgif.exe">
|
||||
]>
|
||||
<doc attrExtEnt="entExt">
|
||||
&ent1;, &ent2;!
|
||||
</doc>
|
||||
|
||||
<!-- Let world.txt contain "world" (excluding the quotes) -->
|
2
test/c14n/without-comments/example-6.xml
Normal file
2
test/c14n/without-comments/example-6.xml
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<doc>©</doc>
|
11
test/c14n/without-comments/example-7.xml
Normal file
11
test/c14n/without-comments/example-7.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE doc [
|
||||
<!ATTLIST e2 xml:space (default|preserve) 'preserve'>
|
||||
<!ATTLIST e3 id ID #IMPLIED>
|
||||
]>
|
||||
<doc xmlns="http://www.ietf.org" xmlns:w3c="http://www.w3.org">
|
||||
<e1>
|
||||
<e2 xmlns="">
|
||||
<e3 id="E3"/>
|
||||
</e2>
|
||||
</e1>
|
||||
</doc>
|
10
test/c14n/without-comments/example-7.xpath
Normal file
10
test/c14n/without-comments/example-7.xpath
Normal file
@ -0,0 +1,10 @@
|
||||
<XPath xmlns:ietf="http://www.ietf.org" >
|
||||
(//.|//@*|//namespace::*)
|
||||
[
|
||||
self::ietf:e1
|
||||
or
|
||||
(parent::ietf:e1 and not(self::text() or self::e2))
|
||||
or
|
||||
count(id("E3")|ancestor-or-self::node()) = count(ancestor-or-self::node())
|
||||
]
|
||||
</XPath>
|
9
test/c14n/without-comments/test-0.xml
Normal file
9
test/c14n/without-comments/test-0.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE envelope [
|
||||
<!ENTITY dsig "http://www.w3.org/2000/09/xmldsig#">
|
||||
<!ENTITY c14n "http://www.w3.org/TR/2001/REC-xml-c14n-20010315">
|
||||
<!ENTITY xpath "http://www.w3.org/TR/1999/REC-xpath-19991116">
|
||||
<!ENTITY xslt "http://www.w3.org/TR/1999/REC-xslt-19991116">
|
||||
<!ATTLIST Notaries Id ID #IMPLIED>
|
||||
]>
|
||||
<Object Id="object-1" MimeType="text/plain">I am the text.</Object>
|
14
test/c14n/without-comments/test-0.xpath
Normal file
14
test/c14n/without-comments/test-0.xpath
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE envelope [
|
||||
<!ENTITY dsig "http://www.w3.org/2000/09/xmldsig#">
|
||||
<!ENTITY c14n "http://www.w3.org/TR/2001/REC-xml-c14n-20010315">
|
||||
<!ENTITY xpath "http://www.w3.org/TR/1999/REC-xpath-19991116">
|
||||
<!ENTITY xslt "http://www.w3.org/TR/1999/REC-xslt-19991116">
|
||||
<!ATTLIST Notaries Id ID #IMPLIED>
|
||||
]>
|
||||
<XPath>
|
||||
(//.|//@*|//namespace::*)
|
||||
[
|
||||
self::text()
|
||||
]
|
||||
</XPath>
|
43
test/c14n/without-comments/test-1.xml
Normal file
43
test/c14n/without-comments/test-1.xml
Normal file
@ -0,0 +1,43 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE envelope [
|
||||
<!ENTITY dsig "http://www.w3.org/2000/09/xmldsig#">
|
||||
<!ENTITY c14n "http://www.w3.org/TR/2001/REC-xml-c14n-20010315">
|
||||
<!ENTITY xpath "http://www.w3.org/TR/1999/REC-xpath-19991116">
|
||||
<!ENTITY xslt "http://www.w3.org/TR/1999/REC-xslt-19991116">
|
||||
<!ATTLIST Notaries Id ID #IMPLIED>
|
||||
]>
|
||||
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="signature">
|
||||
<Object Id="object-4">
|
||||
<X509Data>
|
||||
<X509SubjectName>
|
||||
CN=Merlin Hughes,O=Baltimore Technologies\, Ltd.,ST=Dublin,C=IE
|
||||
</X509SubjectName>
|
||||
<X509IssuerSerial>
|
||||
<X509IssuerName>
|
||||
CN=Test DSA CA,O=Baltimore Technologies\, Ltd.,ST=Dublin,C=IE
|
||||
</X509IssuerName>
|
||||
<X509SerialNumber>970849936</X509SerialNumber>
|
||||
</X509IssuerSerial>
|
||||
<X509Certificate>
|
||||
MIIDNzCCAvWgAwIBAgIEOd3+kDAJBgcqhkjOOAQDMFsxCzAJBgNVBAYTAklFMQ8w
|
||||
DQYDVQQIEwZEdWJsaW4xJTAjBgNVBAoTHEJhbHRpbW9yZSBUZWNobm9sb2dpZXMs
|
||||
IEx0ZC4xFDASBgNVBAMTC1Rlc3QgRFNBIENBMB4XDTAwMTAwNjE2MzIxNVoXDTAx
|
||||
MTAwNjE2MzIxNFowXTELMAkGA1UEBhMCSUUxDzANBgNVBAgTBkR1YmxpbjElMCMG
|
||||
A1UEChMcQmFsdGltb3JlIFRlY2hub2xvZ2llcywgTHRkLjEWMBQGA1UEAxMNTWVy
|
||||
bGluIEh1Z2hlczCCAbYwggErBgcqhkjOOAQBMIIBHgKBgQDaJjfDTrawMHf8MiUt
|
||||
Y54b37hSmYNnR3KpGT10uU1Dqppcju06uN0iGbqf947DjkBC25hKnqykK31xBw0E
|
||||
CPbYq/KC98kghdf2xJCu6B8aqJ95K9jdVflJ3WP7PQxJn+fmM23zy6HYLXVICpfq
|
||||
etdNj/VHCShZE3bdJiE6VobSFQIVAPQecqS2PaTDprcQnkwx4MHTRXhrAoGAMuGA
|
||||
lqeB1ax+vyO2+Osubjhl7pHxLu47RIH+/M52DjESA9KMSrwzsYx8yNR2WooByrE0
|
||||
t6fu0VncK7UK8olO4t7wpv2z4AFQPRVCKFwo0qgn5aKIkICGMlrRy81avb27wGcW
|
||||
othx3iPPMtFXtoDqK0JItaI9R8zc1msFhM1GKMYDgYQAAoGActA8YGxrtngg/zKV
|
||||
vqEOefnwmViFztcnPBYPlJsvh6yKI4iDm68fnp4Mi3RrJ6bZAygFrUIQLxLjV+OJ
|
||||
tgJAEto0xAs+Mehuq1DkSFEpP3oDzCTOsrOiS1DwQe4oIb7zVk/9l7aPtJMHW0LV
|
||||
lMdwZNFNNJoqMcT2ZfCPrfvYvQ2jRzBFMB4GA1UdEQQXMBWBE21lcmxpbkBiYWx0
|
||||
aW1vcmUuaWUwDgYDVR0PAQH/BAQDAgeAMBMGA1UdIwQMMAqACEJZQG0KwRbPMAkG
|
||||
ByqGSM44BAMDMQAwLgIVAK4skWEFYgrggaJA8vYAwSjg12+KAhUAwHTo7wd4tENw
|
||||
9LAKPklQ/74fH18=
|
||||
</X509Certificate>
|
||||
</X509Data>
|
||||
</Object>
|
||||
</Signature>
|
14
test/c14n/without-comments/test-1.xpath
Normal file
14
test/c14n/without-comments/test-1.xpath
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE envelope [
|
||||
<!ENTITY dsig "http://www.w3.org/2000/09/xmldsig#">
|
||||
<!ENTITY c14n "http://www.w3.org/TR/2001/REC-xml-c14n-20010315">
|
||||
<!ENTITY xpath "http://www.w3.org/TR/1999/REC-xpath-19991116">
|
||||
<!ENTITY xslt "http://www.w3.org/TR/1999/REC-xslt-19991116">
|
||||
<!ATTLIST Notaries Id ID #IMPLIED>
|
||||
]>
|
||||
<XPath xmlns:dsig="&dsig;">
|
||||
(//.|//@*|//namespace::*)
|
||||
[
|
||||
ancestor-or-self::dsig:X509Data
|
||||
]
|
||||
</XPath>
|
8
test/c14n/without-comments/test-2.xml
Normal file
8
test/c14n/without-comments/test-2.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0"?>
|
||||
<n0:local xmlns:n0="foo://bar" xmlns:n3="ftp://example.org">
|
||||
<n1:elem2 xmlns:n1="http://example.net" xml:lang="en">
|
||||
<n3:stuff xmlns:n3="ftp://example.org"/>
|
||||
</n1:elem2>
|
||||
</n0:local>
|
||||
|
||||
|
8
test/c14n/without-comments/test-2.xpath
Normal file
8
test/c14n/without-comments/test-2.xpath
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
<XPath xmlns:n1="http://example.net" >
|
||||
(//. | //@* | //namespace::*)
|
||||
[
|
||||
ancestor-or-self::n1:elem2
|
||||
]
|
||||
</XPath>
|
||||
|
18
test/c14n/without-comments/test-3.xml
Normal file
18
test/c14n/without-comments/test-3.xml
Normal file
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE doc [<!ATTLIST e9 attr CDATA "default">]>
|
||||
<doc xmlns:foo="http://www.bar.org" xml:base="http://www.example.org/2002/">
|
||||
<e1 />
|
||||
<e2 ></e2>
|
||||
<e3 name = "elem3" id="elem3" />
|
||||
<e4 name="elem4" id="elem4" ></e4>
|
||||
<e5 a:attr="out" b:attr="sorted" attr2="all" attr="I'm"
|
||||
xmlns:b="http://www.ietf.org"
|
||||
xmlns:a="http://www.w3.org"
|
||||
xmlns="http://example.org"/>
|
||||
<e6 xmlns="" test="../baz" xmlns:a="http://www.w3.org">
|
||||
<e7 xmlns="http://www.ietf.org">
|
||||
<e8 xmlns="" xmlns:a="http://www.w3.org" a:foo="bar">
|
||||
<e9 xmlns="" xmlns:a="http://www.ietf.org"/>
|
||||
</e8>
|
||||
</e7>
|
||||
</e6>
|
||||
</doc>
|
3
test/c14n/without-comments/test-3.xpath
Normal file
3
test/c14n/without-comments/test-3.xpath
Normal file
@ -0,0 +1,3 @@
|
||||
<XPath>
|
||||
(//. | //@* | //namespace::*)[ancestor-or-self::e6]
|
||||
</XPath>
|
1
test/c14n/without-comments/world.txt
Normal file
1
test/c14n/without-comments/world.txt
Normal file
@ -0,0 +1 @@
|
||||
world
|
Loading…
Reference in New Issue
Block a user