Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix document-properties-document #101

Merged
merged 3 commits into from
Oct 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion test-suite/pipelines/ab-doc-prop-001.xpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step"
name="main"
version="3.0">
<p:output port="result"/>
Expand All @@ -14,7 +15,7 @@
</p:identity>

<p:identity>
<p:with-input port="source" select="p:document-properties-document(.)/p:document-properties/a"/>
<p:with-input port="source" select="p:document-properties-document(.)/c:document-properties/a"/>
</p:identity>

</p:declare-step>
3 changes: 2 additions & 1 deletion test-suite/pipelines/ab-doc-prop-002.xpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step"
name="main"
version="3.0">
<p:output port="result"/>
Expand All @@ -14,7 +15,7 @@
</p:identity>

<p:identity>
<p:with-input port="source" select="p:document-properties-document(.)/p:document-properties/a"/>
<p:with-input port="source" select="p:document-properties-document(.)/c:document-properties/a"/>
</p:identity>

</p:declare-step>
3 changes: 2 additions & 1 deletion test-suite/pipelines/ab-doc-prop-003.xpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step"
name="main"
version="3.0">
<p:output port="result"/>
Expand All @@ -14,7 +15,7 @@
</p:identity>

<p:identity>
<p:with-input port="source" select="p:document-properties-document(.)/p:document-properties/a"/>
<p:with-input port="source" select="p:document-properties-document(.)/c:document-properties/a"/>
</p:identity>

</p:declare-step>
3 changes: 2 additions & 1 deletion test-suite/pipelines/ab-doc-prop-004.xpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step"
name="main"
version="3.0">
<p:output port="result"/>
Expand All @@ -14,7 +15,7 @@
</p:identity>

<p:identity>
<p:with-input port="source" select="p:document-properties-document(.)/p:document-properties/a"/>
<p:with-input port="source" select="p:document-properties-document(.)/c:document-properties/a"/>
</p:identity>

</p:declare-step>
3 changes: 2 additions & 1 deletion test-suite/pipelines/ab-doc-prop-005.xpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step"
name="main"
version="3.0">
<p:output port="result"/>
Expand All @@ -19,7 +20,7 @@
</p:identity>

<p:identity>
<p:with-input port="source" select="p:document-properties-document(.)/p:document-properties/a"/>
<p:with-input port="source" select="p:document-properties-document(.)/c:document-properties/a"/>
</p:identity>

</p:declare-step>
3 changes: 2 additions & 1 deletion test-suite/pipelines/ab-doc-prop-006.xpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step"
name="main"
version="3.0">
<p:output port="result"/>
Expand All @@ -11,7 +12,7 @@
</p:input>

<p:identity>
<p:with-input port="source" select="p:document-properties-document(.)/p:document-properties/a"/>
<p:with-input port="source" select="p:document-properties-document(.)/c:document-properties/a"/>
</p:identity>

</p:declare-step>
3 changes: 2 additions & 1 deletion test-suite/pipelines/ab-doc-prop-007.xpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step"
name="main"
version="3.0">
<p:output port="result"/>
Expand All @@ -13,7 +14,7 @@
</p:input>

<p:identity>
<p:with-input port="source" select="p:document-properties-document(.)/p:document-properties/a"/>
<p:with-input port="source" select="p:document-properties-document(.)/c:document-properties/a"/>
</p:identity>

</p:declare-step>
3 changes: 2 additions & 1 deletion test-suite/pipelines/ab-doc-prop-008.xpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step"
name="main"
version="3.0">
<p:output port="result"/>
Expand All @@ -13,7 +14,7 @@
</p:input>

<p:identity>
<p:with-input port="source" select="p:document-properties-document(.)/p:document-properties/a"/>
<p:with-input port="source" select="p:document-properties-document(.)/c:document-properties/a"/>
</p:identity>

</p:declare-step>
3 changes: 2 additions & 1 deletion test-suite/pipelines/ab-doc-prop-009.xpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step"
name="main"
version="3.0">
<p:output port="result"/>
Expand All @@ -15,7 +16,7 @@
</p:input>

<p:identity>
<p:with-input port="source" select="p:document-properties-document(.)/p:document-properties/a"/>
<p:with-input port="source" select="p:document-properties-document(.)/c:document-properties/a"/>
</p:identity>

</p:declare-step>
3 changes: 2 additions & 1 deletion test-suite/pipelines/ab-doc-prop-010.xpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step"
name="main"
version="3.0">
<p:output port="result"/>
Expand All @@ -15,7 +16,7 @@
</p:input>

<p:identity>
<p:with-input port="source" select="p:document-properties-document(.)/p:document-properties/a"/>
<p:with-input port="source" select="p:document-properties-document(.)/c:document-properties/a"/>
</p:identity>

</p:declare-step>
3 changes: 2 additions & 1 deletion test-suite/pipelines/doc-prop-001.xpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step"
name="main"
version="3.0">
<p:output port="result"/>
Expand All @@ -13,7 +14,7 @@
</p:identity>

<p:identity>
<p:with-input port="source" select="p:document-properties-document(.)/p:document-properties/a"/>
<p:with-input port="source" select="p:document-properties-document(.)/c:document-properties/a"/>
</p:identity>

</p:declare-step>
3 changes: 2 additions & 1 deletion test-suite/pipelines/doc-prop-002.xpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step"
name="main"
version="3.0">
<p:output port="result"/>
Expand All @@ -12,7 +13,7 @@
</p:identity>

<p:identity>
<p:with-input port="source" select="p:document-properties-document(.)/p:document-properties/a"/>
<p:with-input port="source" select="p:document-properties-document(.)/c:document-properties/a"/>
</p:identity>

</p:declare-step>
3 changes: 2 additions & 1 deletion test-suite/pipelines/doc-prop-003.xpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step"
name="main"
version="3.0">
<p:output port="result"/>
Expand All @@ -12,7 +13,7 @@
</p:identity>

<p:identity>
<p:with-input port="source" select="p:document-properties-document(.)/p:document-properties/a"/>
<p:with-input port="source" select="p:document-properties-document(.)/c:document-properties/a"/>
</p:identity>

</p:declare-step>
3 changes: 2 additions & 1 deletion test-suite/pipelines/doc-prop-004.xpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step"
name="main"
version="3.0">
<p:output port="result"/>
Expand All @@ -15,7 +16,7 @@
<p:variable name="a" select="."/>

<p:identity>
<p:with-input port="source" select="p:document-properties-document($a)/p:document-properties/a"/>
<p:with-input port="source" select="p:document-properties-document($a)/c:document-properties/a"/>
</p:identity>

</p:declare-step>
3 changes: 2 additions & 1 deletion test-suite/pipelines/doc-prop-005.xpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step"
name="main"
version="3.0">
<p:output port="result"/>
Expand All @@ -8,7 +9,7 @@

<!-- this should fail, $a isn't a document -->
<p:identity>
<p:with-input port="source" select="p:document-properties-document($a)/p:document-properties/a">
<p:with-input port="source" select="p:document-properties-document($a)/c:document-properties/a">
<p:empty/>
</p:with-input>
</p:identity>
Expand Down
19 changes: 15 additions & 4 deletions test-suite/tests/ab-document-properties-doc001.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
<t:info>
<t:title>ab-document-properties-document-001</t:title>
<t:revision-history>
<t:revision>
<t:date>2018-10-22</t:date>
<t:author initials="ndw">
<t:name>Norman Walsh</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Fixed result document
(<code>c:document-properties</code>, not <code>p:document-properties</code>)</p>
</t:description>
</t:revision>
<t:revision>
<t:date>2018-04-25T18:11:02+02:00</t:date>
<t:author>
Expand Down Expand Up @@ -33,13 +43,14 @@
<t:schematron>
<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron" xmlns="http://www.w3.org/1999/xhtml">
<s:ns prefix="p" uri="http://www.w3.org/ns/xproc"/>
<s:ns prefix="c" uri="http://www.w3.org/ns/xproc-step"/>
<s:pattern>
<s:rule context="/">
<s:assert test="p:document-properties">The document root is not document-properties.</s:assert>
<s:assert test="/p:document-properties/content-type = 'application/xml'">Content-type is not application/xml.</s:assert>
<s:assert test="ends-with(/p:document-properties/base-uri, 'document-properties-doc001.xml')">Base-uri is not correct.</s:assert>
<s:assert test="c:document-properties">The document root is not document-properties.</s:assert>
<s:assert test="/c:document-properties/content-type = 'application/xml'">Content-type is not application/xml.</s:assert>
<s:assert test="ends-with(/c:document-properties/base-uri, 'document-properties-doc001.xml')">Base-uri is not correct.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
</t:schematron>
</t:test>
</t:test>
19 changes: 15 additions & 4 deletions test-suite/tests/ab-document-properties-doc002.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
<t:info>
<t:title>ab-document-properties-document-002</t:title>
<t:revision-history>
<t:revision>
<t:date>2018-10-22</t:date>
<t:author initials="ndw">
<t:name>Norman Walsh</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Fixed result document
(<code>c:document-properties</code>, not <code>p:document-properties</code>)</p>
</t:description>
</t:revision>
<t:revision>
<t:date>2018-04-25T18:11:02+02:00</t:date>
<t:author>
Expand Down Expand Up @@ -35,13 +45,14 @@
<t:schematron>
<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron" xmlns="http://www.w3.org/1999/xhtml">
<s:ns prefix="p" uri="http://www.w3.org/ns/xproc"/>
<s:ns prefix="c" uri="http://www.w3.org/ns/xproc-step"/>
<s:pattern>
<s:rule context="/">
<s:assert test="p:document-properties">The document root is not document-properties.</s:assert>
<s:assert test="/p:document-properties/content-type = 'application/xml'">Content-type is not application/xml.</s:assert>
<s:assert test="ends-with(/p:document-properties/base-uri, 'document-properties-doc002.xml')">Base-uri is not correct.</s:assert>
<s:assert test="c:document-properties">The document root is not c:document-properties.</s:assert>
<s:assert test="/c:document-properties/content-type = 'application/xml'">Content-type is not application/xml.</s:assert>
<s:assert test="ends-with(/c:document-properties/base-uri, 'document-properties-doc002.xml')">Base-uri is not correct.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
</t:schematron>
</t:test>
</t:test>
19 changes: 15 additions & 4 deletions test-suite/tests/ab-document-properties-doc003.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
<t:info>
<t:title>ab-document-properties-document-003</t:title>
<t:revision-history>
<t:revision>
<t:date>2018-10-22</t:date>
<t:author initials="ndw">
<t:name>Norman Walsh</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Fixed result document
(<code>c:document-properties</code>, not <code>p:document-properties</code>)</p>
</t:description>
</t:revision>
<t:revision>
<t:date>2018-04-25T18:11:02+02:00</t:date>
<t:author>
Expand Down Expand Up @@ -31,14 +41,15 @@
<t:schematron>
<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron" xmlns="http://www.w3.org/1999/xhtml">
<s:ns prefix="p" uri="http://www.w3.org/ns/xproc"/>
<s:ns prefix="c" uri="http://www.w3.org/ns/xproc-step"/>
<s:pattern>
<s:rule context="/">
<s:assert test="result">The document root is not result.</s:assert>
<s:assert test="/result/p:document-properties">The root has no child document-properties.</s:assert>
<s:assert test="/result/p:document-properties/content-type = 'application/xml'">Content-type is not application/xml.</s:assert>
<s:assert test="ends-with(/result/p:document-properties/base-uri, '/documents/ab-doc.xml')">Base-uri is not correct.</s:assert>
<s:assert test="/result/c:document-properties">The root has no child document-properties.</s:assert>
<s:assert test="/result/c:document-properties/content-type = 'application/xml'">Content-type is not application/xml.</s:assert>
<s:assert test="ends-with(/result/c:document-properties/base-uri, '/documents/ab-doc.xml')">Base-uri is not correct.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
</t:schematron>
</t:test>
</t:test>
19 changes: 15 additions & 4 deletions test-suite/tests/ab-document-properties-doc004.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
<t:info>
<t:title>ab-document-properties-document-004</t:title>
<t:revision-history>
<t:revision>
<t:date>2018-10-22</t:date>
<t:author initials="ndw">
<t:name>Norman Walsh</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Fixed result document
(<code>c:document-properties</code>, not <code>p:document-properties</code>)</p>
</t:description>
</t:revision>
<t:revision>
<t:date>2018-04-25T18:11:02+02:00</t:date>
<t:author>
Expand Down Expand Up @@ -32,14 +42,15 @@
<t:schematron>
<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron" xmlns="http://www.w3.org/1999/xhtml">
<s:ns prefix="p" uri="http://www.w3.org/ns/xproc"/>
<s:ns prefix="c" uri="http://www.w3.org/ns/xproc-step"/>
<s:pattern>
<s:rule context="/">
<s:assert test="result">The document root is not result.</s:assert>
<s:assert test="/result/p:document-properties">The root has no child document-properties.</s:assert>
<s:assert test="/result/p:document-properties/content-type = 'application/xml'">Content-type is not application/xml.</s:assert>
<s:assert test="ends-with(/result/p:document-properties/base-uri, '/documents/ab-doc.xml')">Base-uri is not correct.</s:assert>
<s:assert test="/result/c:document-properties">The root has no child document-properties.</s:assert>
<s:assert test="/result/c:document-properties/content-type = 'application/xml'">Content-type is not application/xml.</s:assert>
<s:assert test="ends-with(/result/c:document-properties/base-uri, '/documents/ab-doc.xml')">Base-uri is not correct.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
</t:schematron>
</t:test>
</t:test>
Loading