aboutsummaryrefslogtreecommitdiffstats
path: root/test/errors
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2001-10-08 09:55:22 +0000
committerKeiron Liddle <keiron@apache.org>2001-10-08 09:55:22 +0000
commite052f0e8b0f185e371412ceaa357310053efa2f5 (patch)
treeb433bf378ad644806963d61f3b00281a5936b5e3 /test/errors
parent00589aec361fc04bf6dcb47b1fab513541744be4 (diff)
downloadxmlgraphics-fop-e052f0e8b0f185e371412ceaa357310053efa2f5.tar.gz
xmlgraphics-fop-e052f0e8b0f185e371412ceaa357310053efa2f5.zip
added some tests with invalid xml or unknown namespaces
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194495 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/errors')
-rw-r--r--test/errors/foreign.fo73
-rw-r--r--test/errors/inavliddoc.fo16
-rw-r--r--test/errors/inavlidxml.fo3
-rw-r--r--test/errors/inavlidxml1.fo4
-rw-r--r--test/errors/inavlidxml2.fo33
-rw-r--r--test/errors/unknown.fo37
6 files changed, 166 insertions, 0 deletions
diff --git a/test/errors/foreign.fo b/test/errors/foreign.fo
new file mode 100644
index 000000000..31833717f
--- /dev/null
+++ b/test/errors/foreign.fo
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master
+ margin-right="1.5cm"
+ margin-left="1.5cm"
+ margin-bottom="2cm"
+ margin-top="1cm"
+ page-width="21cm"
+ page-height="29.7cm"
+ master-name="first">
+ <fo:region-before extent="1cm"/>
+ <fo:region-body margin-top="1cm"/>
+ <fo:region-after extent="1.5cm"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+
+ <fo:page-sequence master-name="first">
+ <fo:static-content flow-name="xsl-region-before">
+ <fo:block line-height="14pt" font-size="10pt"
+ text-align="end">Embedding SVG examples</fo:block>
+ </fo:static-content>
+ <fo:static-content flow-name="xsl-region-after">
+ <fo:block line-height="14pt" font-size="10pt"
+ text-align="end">Page <fo:page-number/></fo:block>
+ </fo:static-content>
+
+ <fo:flow flow-name="xsl-region-body">
+
+ <fo:block text-align="center" font-weight="bold" font-size="14pt" space-before.optimum="3pt" space-after.optimum="15pt">
+ Embedding SVG
+ </fo:block>
+
+ <fo:block space-before.optimum="3pt" space-after.optimum="20pt">
+<fo:instream-foreign-object>
+<foo xmlns="http://www.foo.com" width="20" height="20">
+ <g style="fill:red; stroke:#000000">
+ <rect x="0" y="0" width="15" height="15"/>
+ <rect x="5" y="5" width="15" height="15"/>
+ </g>
+</foo>
+</fo:instream-foreign-object>
+ </fo:block>
+
+ <fo:block space-before.optimum="5pt">
+<fo:instream-foreign-object xmlns:svg="http://www.w3.org/2000/svg">
+<svg:svg width="20" height="20">
+ <svg:g style="fill:red; stroke:#000000">
+ <svg:rect x="0" y="0" width="15" height="15"/>
+ <svg:rect x="5" y="5" width="15" height="15"/>
+ </svg:g>
+</svg:svg>
+</fo:instream-foreign-object>
+ </fo:block>
+
+<foo xmlns="http://www.foo.com" width="20" height="20">
+ <g style="fill:red; stroke:#000000">
+ <rect x="0" y="0" width="15" height="15"/>
+ <rect x="5" y="5" width="15" height="15"/>
+ </g>
+</foo>
+
+<foo width="20" height="20">
+ <rect x="5" y="5" width="15" height="15"/>
+</foo>
+
+<fo:foo width="20" height="20">
+ <fo:rect x="5" y="5" width="15" height="15"/>
+</fo:foo>
+ </fo:flow>
+ </fo:page-sequence>
+</fo:root>
+
diff --git a/test/errors/inavliddoc.fo b/test/errors/inavliddoc.fo
new file mode 100644
index 000000000..c12f23f82
--- /dev/null
+++ b/test/errors/inavliddoc.fo
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+ <!-- defines page layout -->
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="first"
+ page-height="29.7cm" page-width="21cm"
+ margin-top="1cm"
+ margin-bottom="2cm"
+ margin-left="2.5cm"
+ margin-right="2.5cm">
+ <fo:region-body margin-top="3cm"/>
+ <fo:region-before extent="3cm"/>
+ <fo:region-after extent="1.5cm"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+
diff --git a/test/errors/inavlidxml.fo b/test/errors/inavlidxml.fo
new file mode 100644
index 000000000..4a6a35e67
--- /dev/null
+++ b/test/errors/inavlidxml.fo
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+fegsdfgdsgfsdgf
+
diff --git a/test/errors/inavlidxml1.fo b/test/errors/inavlidxml1.fo
new file mode 100644
index 000000000..614b49da3
--- /dev/null
+++ b/test/errors/inavlidxml1.fo
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<fo:root>
+<fo:page-sequence>
+<fo:root>
diff --git a/test/errors/inavlidxml2.fo b/test/errors/inavlidxml2.fo
new file mode 100644
index 000000000..2e7c583c1
--- /dev/null
+++ b/test/errors/inavlidxml2.fo
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+fegsdfgdsgfsdgf
+
+<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+
+ <!-- defines page layout -->
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="first"
+ page-height="29.7cm" page-width="21cm"
+ margin-top="1cm"
+ margin-bottom="2cm"
+ margin-left="2.5cm"
+ margin-right="2.5cm">
+ <fo:region-body margin-top="3cm"/>
+ <fo:region-before extent="3cm"/>
+ <fo:region-after extent="1.5cm"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <!-- end: defines page layout -->
+
+ <!-- actual layout -->
+ <fo:page-sequence master-name="first">
+
+ <!-- text body -->
+ <fo:flow flow-name="xsl-region-body">
+
+ <!-- Normal text -->
+ <fo:block text-align="center">0. Normal text without link
+ </fo:block>
+</fo:flow>
+</fo:page-sequence>
+</fo:root>
+
diff --git a/test/errors/unknown.fo b/test/errors/unknown.fo
new file mode 100644
index 000000000..490a6375b
--- /dev/null
+++ b/test/errors/unknown.fo
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<fo:root source-document="a" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master
+ margin-right="1.5cm"
+ margin-left="1.5cm"
+ margin-bottom="2cm"
+ margin-top="1cm"
+ page-width="21cm"
+ page-height="29.7cm"
+ master-name="first">
+ <fo:region-before extent="1cm"/>
+ <fo:region-body margin-top="1cm"/>
+ <fo:region-after extent="1.5cm"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+
+ <fo:page-sequence master-name="first">
+ <fo:flow source-document="a" flow-name="xsl-region-body">
+
+ <fo:block source-document="inherit" space-before.optimum="3pt" space-after.optimum="15pt">
+ The Counter Extension
+ </fo:block>
+
+ <fo:block space-before.optimum="3pt" space-after.optimum="20pt">
+
+<fo:instream-foreign-object>
+<fake xmlns="http://www.foo.com/fake">
+<a>
+</a>
+</fake>
+</fo:instream-foreign-object>
+ </fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+</fo:root>
+