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

Allow p:filter to return non-node results #645

Merged
merged 1 commit into from
Jan 5, 2025
Merged
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
21 changes: 13 additions & 8 deletions steps/src/main/xml/steps/filter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,29 @@
xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="c.filter">
<title>p:filter</title>

<para>The <code>p:filter</code> step selects portions of the source document
based on a (possibly dynamically constructed) XPath select expression.</para>
<para>The <code>p:filter</code> step evaluates an XPath expression
against the input document.</para>

<p:declare-step type="p:filter">
<p:input port="source" content-types="xml html"/>
<p:output port="result" sequence="true" content-types="text xml html"/>
<p:output port="result" sequence="true" content-types="text xml html json"/>
<p:option name="select" required="true" as="xs:string" e:type="XPathExpression"/>
</p:declare-step>

<para>This step behaves just like a <tag>p:with-input</tag> with
<para>This step evaluates the <tag class="attribute">select</tag> expression
against the input document. The result of that evaluation appears on the
<port>result</port> port.</para>

<para>This step is very similar to a <tag>p:with-input</tag> with
a <tag class="attribute">select</tag> expression except that the select
expression is computed dynamically.</para>
expression is computed dynamically (because it’s a step option in this case).</para>

<simplesect>
<title>Document properties</title>
<para feature="filter-preserves-none">No document properties are preserved.
The <property>base-uri</property> property of each document will reflect the
base URI of the selected node(s).
<para feature="filter-preserves-none">No document properties are preserved. When
portions of the input are selected, the <property>base-uri</property> property
of each document constructed from a selected portion will reflect the base URI
of the selected node(s).
</para>
</simplesect>
</section>
Loading