Ticket #5275 (closed enhancement: fixed)

Opened 4 years ago

Last modified 3 years ago

Pass through URI parameters

Reported by: kate Assigned to: roadrunner
Priority: normal Component: XsltMacro
Severity: normal Keywords: xslt param docbook
Cc: Trac Release: 0.11

Description

Firstly, thank you for such a nice little macro. Finally, I have a way to integrate docbook into Trac, without having to maintain separate Trac-themed HTML pages. I've two (related) feature requests:

I'm wondering about pagination for large documents. Would it be convenient for the macro to find ?page=123 style arguments from the URI, and pass these through to the stylesheet as <xsl:param> parameters? (These can be programatically bound before executing the stylesheet). I guess it's a bit weird for a macro to pick things up from the request URI, but it seems to make sense in this case.

Another approach would be to pass parameters as extra macro arguments: [[Xslt(..., ..., 'page=1')]] or somesuch. In my case for pagination I'd need to make a separate wiki page per-chapter, though, which wouldn't be nice - but I think passing params here could also be useful in general, for other situations.

Attachments

Change History

04/29/10 11:17:20 changed by roadrunner

See macro's documentation in the WikiMacros page after installing this macro: you can specify arbitrary xslt parameters by passing those parameters to the macro and prefixing them with 'xp_'. Example:

[[Xslt(view.xsl, doc.xml, xp_foo=yes, xp_bar=42)]]

would pass 'foo=yes' and 'bar=42' parameters to the transform.

As for passing through http request parameters, that's an interesting idea.

05/02/10 16:32:18 changed by roadrunner

  • status changed from new to closed.
  • resolution set to fixed.

(In [7914]) Pass (http) request parameters which start with xp_ to the stylesheet as additional parameters. This can be useful for example to implement paging.

This closes #5275.


Add/Change #5275 (Pass through URI parameters)




Change Properties
Action