Changeset 01a6690
- Timestamp:
- 13/04/2012 19:08:04 (10 years ago)
- Branches:
- master
- Children:
- 9d99928
- Parents:
- 5ac9ea9
- git-author:
- Eric van der Vlist <vdv@dyomedea.com> (13/04/2012 19:08:04)
- git-committer:
- Eric van der Vlist <vdv@dyomedea.com> (13/04/2012 19:08:04)
- Location:
- archiver/pipelines/actions
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
archiver/pipelines/actions/archive-resource.xpl
r3d18e9d r01a6690 133 133 </p:processor> 134 134 135 <!-- It's a hack so that the document is not submitted as text through the xforms:submit processor... --> 136 <p:processor name="oxf:xslt"> 137 <p:input name="config"> 138 <document xsl:version="2.0"> 139 <xsl:copy-of select="/"/> 140 </document> 141 </p:input> 142 <p:input name="data" href="#rewritten"/> 143 <p:output name="data" id="rewritten-embedded"/> 144 </p:processor> 135 145 136 146 <!-- Store the rewritten document in the database --> … … 148 158 </config> 149 159 </p:input> 150 <p:input name="param" href="#rewritten "/>160 <p:input name="param" href="#rewritten-embedded"/> 151 161 <p:output name="data" id="response3"/> 152 162 </p:processor> -
archiver/pipelines/actions/mediatypes/css.xpl
rcf97a98 r01a6690 24 24 <xsl:value-of select="/*"/> 25 25 </url> 26 <content-type>text/css</content-type> 26 27 <mode>text</mode> 27 28 </config> … … 98 99 </xsl:stylesheet> 99 100 </p:input> 100 <p:output name="data" id="rewritten-local" debug="rewritten"/>101 <p:output name="data" ref="rewritten" debug="rewritten"/> 101 102 </p:processor> 102 103 103 <!-- It's a hack so that the document is not submitted as text through the xforms:submit processor... --> 104 <p:processor name="oxf:xslt"> 105 <p:input name="config"> 106 <document xsl:version="2.0"> 107 <xsl:copy-of select="/"/> 108 </document> 109 </p:input> 110 <p:input name="data" href="#rewritten-local"/> 111 <p:output name="data" ref="rewritten"/> 112 </p:processor> 104 113 105 114 106 </p:config> -
archiver/pipelines/actions/mediatypes/html.xpl
r16cc943 r01a6690 106 106 </xsl:stylesheet> 107 107 </p:input> 108 <p:output name="data" ref="rewritten" debug="rewritten"/> 108 <p:output name="data" id="html-rewritten" debug="rewritten"/> 109 </p:processor> 110 111 <p:processor name="oxf:xml-converter"> 112 <p:input name="config"> 113 <config> 114 <content-type>application/xml</content-type> 115 <encoding>utf-8</encoding> 116 <version>1.0</version> 117 </config> 118 </p:input> 119 <p:input name="data" href="#html-rewritten"/> 120 <p:output name="data" ref="rewritten"/> 109 121 </p:processor> 110 122 -
archiver/pipelines/actions/package-archive.xpl
r5ac9ea9 r01a6690 229 229 <p:choose href="current()"> 230 230 <p:when test="/archive/@href-rewritten"> 231 <p:processor name="oxf:identity"> 232 <p:input name="data"> 233 <none/> 231 <!-- Read the rewritten document --> 232 <p:processor name="oxf:pipeline"> 233 <p:input name="config" href="/data-access.xpl"/> 234 <p:input name="data" transform="oxf:xslt" href="aggregate('root', #data, current())"> 235 <config xsl:version="2.0"> 236 <relpath> 237 <xsl:value-of select="/root/action/@directory"/> 238 <xsl:value-of select="/root/archive/@href-rewritten"/> 239 </relpath> 240 <operation>read</operation> 241 <type>document</type> 242 </config> 234 243 </p:input> 244 <p:input name="param"> 245 <empty/> 246 </p:input> 247 <p:output name="data" id="rewritten" debug="rewritten"/> 248 </p:processor> 249 <!-- Store this document --> 250 <p:processor name="oxf:file-serializer"> 251 <p:input name="config"> 252 <config> 253 <scope>request</scope> 254 </config> 255 </p:input> 256 <p:input name="data" href="#rewritten#xpointer(/document/document)"/> 235 257 <p:output name="data" id="file" debug="file"/> 236 258 </p:processor> … … 271 293 </file> 272 294 <xsl:for-each select="/root/files/file[url]"> 273 <xsl:variable name="tokens" select="tokenize(archive/@url, '/')"/> 274 <xsl:variable name="last-token" select="$tokens[last()]"/> 275 <xsl:variable name="tokens2" select="tokenize($last-token, '\.')"/> 276 <xsl:variable name="extension" select="$tokens2[last()]"/> 277 <file name="rewritten/{saxon:string-to-hexBinary(substring(archive/@url, 1, string-length(archive/@url) - string-length($extension) - 1), 'utf-8')}.{$extension}"> 278 <xsl:value-of select="url"/> 279 </file> 295 <xsl:choose> 296 <xsl:when test="position()=1"> 297 <!-- TODO: support non HTML documents... --> 298 <file name="rewritten/index.html"> 299 <xsl:value-of select="url"/> 300 </file> 301 </xsl:when> 302 <xsl:otherwise> 303 <xsl:variable name="tokens" select="tokenize(archive/@url, '/')"/> 304 <xsl:variable name="last-token" select="$tokens[last()]"/> 305 <xsl:variable name="tokens2" select="tokenize($last-token, '\.')"/> 306 <xsl:variable name="extension" select="$tokens2[last()]"/> 307 <file name="rewritten/{saxon:string-to-hexBinary(substring(archive/@url, 1, string-length(archive/@url) - string-length($extension) - 1), 'utf-8')}.{$extension}"> 308 <xsl:value-of select="url"/> 309 </file> 310 </xsl:otherwise> 311 </xsl:choose> 280 312 </xsl:for-each> 281 313 </files>
Note: See TracChangeset
for help on using the changeset viewer.