SHARE
TWEET

Reading external files

dcramer Apr 30th, 2012 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     <p:declare-step
  2.        xmlns:p="http://www.w3.org/ns/xproc"
  3.        xmlns:l="http://xproc.org/library"
  4.        type="l:normalize-wadls"
  5.        xmlns:c="http://www.w3.org/ns/xproc-step"
  6.        version="1.0"
  7.        name="normalize-wadls-step">
  8.        
  9.         <p:input port="source"/>
  10.        
  11.         <p:output port="secondary" primary="false" sequence="true"/>
  12.         <p:output port="result" primary="true" >
  13.             <p:pipe step="lists-files" port="result"/>
  14.         </p:output>
  15.        
  16.         <p:input port="parameters" kind="parameter"/>
  17.        
  18.         <p:xslt name="lists-files">
  19.             <p:input port="source">
  20.                 <p:pipe step="normalize-wadls-step" port="source"/>
  21.             </p:input>
  22.             <p:input port="stylesheet">
  23.                 <p:document href="classpath:/cloud/list-wadls.xsl"/>
  24.             </p:input>
  25.             <p:input port="parameters" >
  26.                 <p:pipe step="normalize-wadls-step" port="parameters"/>
  27.             </p:input>
  28.         </p:xslt>
  29.        
  30.         <p:for-each>
  31.             <p:iteration-source select="//@href">
  32.                 <p:pipe step="lists-files" port="secondary"/>
  33.             </p:iteration-source>
  34.  
  35.             <p:xslt name="normalize-wadl">
  36.                 <p:input port="source"/>
  37.                 <p:input port="stylesheet">
  38.                     <p:document href="classpath:/cloud/normalizeWadl/normalizeWadl.xsl"/>
  39.                 </p:input>
  40.                 <p:input port="parameters" >
  41.                     <p:pipe step="normalize-wadls-step" port="parameters"/>
  42.                 </p:input>
  43.             </p:xslt>
  44.            
  45.             <p:store encoding="utf-8" indent="true"
  46.                omit-xml-declaration="false">
  47.                 <p:with-option name="href" select="concat('target/generated-resources/xml/xslt',replace(base-uri(/*), '^(.*/)?([^/]+)$', '$2'))"/>
  48.             </p:store>
  49.         </p:for-each>
  50.        
  51.     </p:declare-step>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top