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">
    <xhtml:p><xhtml:a href="http://www.w3.org/People/Raggett/tidy/">HTML
  <p:input port="source"/>
  <p:output port="result"/>
  <p:option name="href"/>
  <p:exec command="tidy"
    <p:input port="source">
      <p:data href="../data/BrowseProjects.jspa.html"/>
    <p:with-option name="args" select="'--quiet yes --show-warnings no
--doctype omit --numeric-entities yes --output-xml yes'"/>
  <p:unwrap match="c:result"/> 

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?


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

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 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:03:04 UTC