Tecnologías XML / XProc / Referencia / make-absolute-uris
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:make-absolute-uris
<p:declare-step type="p:make-absolute-uris">
<p:input port="source"/>
<p:output port="result"/>
<p:option name="match" required="true"/> <!-- XSLTMatchPattern -->
<p:option name="base-uri"/> <!-- anyURI -->
</p:declare-step>
El paso <p:make-absolute-uris> crea enlaces absolutos a partir del contenido seleccionado por una expresión XSLT. La opción “base-uri“ define la URI base antepuesta a todas las entradas convertidas en rutas absolutas.
Ejemplo
Convirtamos todos los directores a URI absolutas con base "http://www.fh-worms.de".
<?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="filmsammlung.xml"/>
</p:input>
<p:output port="result"/>
<p:make-absolute-uris base-uri="http://www.fh-worms.de/" match="/FilmSammlung/Film/Regisseur"/>
</p:declare-step>
Este es un fragmento del resultado:
<FilmSammlung>
<Film>
<Titel>Star Wars: Episode IV - A New Hope</Titel>
<Jahr>1978</Jahr>
<Genre>SciFi</Genre>
<Regisseur>http://www.fh-worms.de/George%20Lucas</Regisseur>
<Produzent>George Lucas</Produzent>
<Cast>
[...]