Skip to content

Commit

Permalink
Allow p:filter to return atomic values
Browse files Browse the repository at this point in the history
  • Loading branch information
ndw committed Dec 24, 2024
1 parent 0b302bb commit 13430bb
Showing 1 changed file with 13 additions and 8 deletions.
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>

0 comments on commit 13430bb

Please sign in to comment.