XProc steps
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
p:delete
With the help of this step, contents from the XML input document can be deleted. These contents are determined by a XSLT expression.
The output is done via the result port.
Example
All the information about the cast shall be removed from the known example document.
<?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" version="1.0">
<p:input port="source">
<p:document href="FilmCollection.xml"/>
</p:input>
<p:output port="result"/>
<p:delete match="/FilmCollection/Film/Cast"/>
</p:declare-step>
In the “match“ attribute of <p:delete> an appropriate expression defines that all “Cast“ elements shall be removed from the input document.
The following output is generated by the XProc processor (excerpt):
<FilmCollection>
<Film>
<Title>Star Wars: Episode IV - A New Hope</Title>
<Year>1978</Year>
<Genre>SciFi</Genre>
<Director>George Lucas</Director>
<Producer>George Lucas</Producer>
<Duration>121 min</Duration>
<Author>George Lucas</Author>
</Film>
<Film>
...