W3C home > Mailing lists > Public > xproc-dev@w3.org > April 2009

How do you pass step options to p:data/@href???

From: Philip Fennell <Philip.Fennell@bbc.co.uk>
Date: Thu, 30 Apr 2009 10:04:19 +0100
Message-ID: <F3685F4A877F284F8054E328390447D14C6E75@bbcxues17.national.core.bbc.co.uk>
To: <xproc-dev@w3.org>
In the following step declaration I'm attempting to invoke HTML-Tidy:


<p:declare-step type="tidy:html">
  <p:documentation>
    <xhtml:p><xhtml:a href="http://www.w3.org/People/Raggett/tidy/">HTML
Tidy</xhtml:a></xhtml:p>
  </p:documentation>
  <p:input port="source"/>
  <p:output port="result"/>
  
  <p:option name="href"/>
  
  <p:exec command="tidy"
      source-is-xml="false"
      result-is-xml="false"
      wrap-result-lines="false"
      method="xml">
    <p:input port="source">
      <p:data href="../data/BrowseProjects.jspa.html"/>
    </p:input>
    <p:with-option name="args" select="'--quiet yes --show-warnings no
--doctype omit --numeric-entities yes --output-xml yes'"/>
  </p:exec>
  
  <p:unescape-markup/>
  
  <p:unwrap match="c:result"/> 
  
</p:declare-step>


It works fine as it is, but, I'd like to use the 'href' option I've
declared for the step to pass in the location of the source HTML file.
However, the value of: p:data/@href won't take an expression e.g. $href
and p:data doesn't allow <p:with-option name="href" select="$href"/>

How do I pass the HTML source document URI to p:data as there is no
other mechanism to get hold of unparsed character data?


Regards

Philip Fennell

>XML Developer (The Forge)
>
>BBC Future Media & Technology
>Media Village, 201 Wood Lane London W12 7TP
>BC4 C4, Broadcast Centre
>
>T:	0208 0085318

http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
					
Received on Thursday, 30 April 2009 09:04:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 30 April 2009 09:04:54 GMT