Project

Profile

Help

<xsl:result-document/> href attribute.

Added by Anonymous over 15 years ago

Legacy ID: #6551565 Legacy Poster: Ivan Latysh (ivanlatysh)

My template does not produce an output, it is using a custom emitter, and since XSLT 2.0 spec is required href attribute I have to specify it. To make things worse my template is calling <xsl:result-document/> multiple times, so href can't be pointed to the same URI. My question: Is there are any URI that pointed to null and can be used for multiple <xsl:result-document/> calls? If not, can my Emitter register a custom URL resolver for result document, if yes, how ?


Replies (2)

RE: &lt;xsl:result-document/&gt; href attribute. - Added by Anonymous over 15 years ago

Legacy ID: #6551846 Legacy Poster: Michael Kay (mhkay)

You can register an OutputURIResolver with the Transformer/Controller. It will be passed the URI specified in the href() attribute, and typically returns a StreamResult object. It's actually the systemId() of this StreamResult object that has to be unique (so you can ignore the value of href if you want). The StreamResult object will be passed to your custom Emitter using the setStreamResult() method. At this point you're at liberty to ignore the systemId if you want, so it could be a randomly-generated string.

RE: &lt;xsl:result-document/&gt; href attribute. - Added by Anonymous over 15 years ago

Legacy ID: #6551966 Legacy Poster: Ivan Latysh (ivanlatysh)

Thank you ! Will try it tonight.

    (1-2/2)

    Please register to reply