Changes between Version 23 and Version 24 of XsltMacro


Ignore:
Timestamp:
Nov 8, 2015, 3:44:13 PM (8 years ago)
Author:
figaro
Comment:

Cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • XsltMacro

    v23 v24  
    11[[PageOutline(2-5,Contents,pullout)]]
    2 = XSL-Transformation Macro =
     2
     3= XSL-Transformation Macro
    34
    45== Description ==
    56
    6 The XsltMacro allows you to embed the result of an XSL-transformation
    7 in a page. It takes two parameters, a stylesheet and a document to
    8 transform. These can be an attachment on any wiki-page or ticket, any
    9 page from the htdocs area, any file in the repository, or any url
    10 (these options are similar to those for Trac's native
    11 [http://projects.edgewall.com/trac/wiki/WikiMacros#AvailableMacros ImageMacro]).
     7The XsltMacro allows you to embed the result of an XSL-transformation in a page. It takes two parameters, a stylesheet and a document to transform. These can be an attachment on any wiki-page or ticket, any page from the htdocs area, any file in the repository, or any url (these options are similar to those for Trac's native [http://projects.edgewall.com/trac/wiki/WikiMacros#AvailableMacros ImageMacro]).
    128For more details see the documentation in the macro.
    139
    14 The macro can either be installed as a simple macro or as a plugin;
    15 the ''use_iframe'' and ''use_object'' options (see below) only work
    16 when installed as a plugin.
     10The macro can either be installed as a simple macro or as a plugin; the ''use_iframe'' and ''use_object'' options (see below) only work when installed as a plugin.
    1711
    18 This macro requires that [http://xmlsoft.org/ libxml2],
    19 [http://xmlsoft.org/ libxslt], and their python bindings are
    20 installed.
     12This macro requires that [http://xmlsoft.org/ libxml2], [http://xmlsoft.org/ libxslt], and their python bindings are installed.
    2113
     14=== IFrames/Objects
    2215
    23 == IFrames/Objects ==
     16Because a macro's output is embedded in the html of the wiki page, the xsl-stylesheet must not produce a full html page. As an alternative, you can pass the ''use_iframe'' or ''use_object'' option to the macro; this will cause the macro put an <iframe> or <object> tag (respectively) into the page instead of the results from the stylesheet. The stylesheet can (and must) then generate a complete html page.
    2417
    25 Because a macro's output is embedded in the html of the wiki page, the
    26 xsl-stylesheet must not produce a full html page. As an alternative,
    27 you can pass the ''use_iframe'' or ''use_object'' option to the macro;
    28 this will cause the macro put an <iframe> or <object> tag
    29 (respectively) into the page instead of the results
    30 from the stylesheet. The stylesheet can (and must) then generate a
    31 complete html page.
     18The downside of iframes/objects is that you need to know the height of the result in order to set the height of the iframe/object; otherwise you will either get extra space at the bottom or you'll have to scroll through the frame. The macro generates some javascript to automatically set this height, but that only works if the user has javascript enabled of course.
    3219
    33 The downside of iframes/objects is that you need to know the height of
    34 the result in order to set the height of the iframe/object; otherwise
    35 you'll either get extra space at the bottom or you'll have to scroll
    36 through the frame. The macro generates some javascript to
    37 automatically set this height, but that only works if the user has
    38 javascript enabled of course.
    39 
    40 == Bugs/Feature Requests ==
     20== Bugs/Feature Requests
    4121
    4222Existing bugs and feature requests for XsltMacro are
     
    4424
    4525If you have any issues, create a
    46 [http://trac-hacks.org/newticket?component=XsltMacro&owner=roadrunner new ticket].
     26[/newticket?component=XsltMacro new ticket].
    4727
    48 == Download ==
     28[[TicketQuery(component=XsltMacro&group=type,format=progress)]]
    4929
    50 If you're running trac 0.9 or 0.10 and want to install this as a
    51 simple macro, then just download
    52 [http://trac-hacks.org/svn/xsltmacro/0.9/xslt/Xslt.py this file] and
    53 put it in your {{{wiki-macros}}} directory.
     30== Download
    5431
    55 To install as a plugin, download the [download:xsltmacro zipped source],
    56 unzip, change the directory to {{{xsltmacro/0.9}}} (for trac 0.9 or 0.10)
    57 or {{{xsltmacro/0.11}}} (for trac 0.11 or 0.12), run[[BR]]
     32If you're running Trac 0.9 or 0.10 and want to install this as a simple macro, then just download [http://trac-hacks.org/svn/xsltmacro/0.9/xslt/Xslt.py this file] and put it in your {{{wiki-macros}}} directory.
     33
     34To install as a plugin, download the [download:xsltmacro zipped source], unzip, change the directory to {{{xsltmacro/0.9}}} (for Trac 0.9 or 0.10)
     35or {{{xsltmacro/0.11}}} (for Trac 0.11 or 0.12), run:
     36
    5837{{{python setup.py bdist_egg}}}, and copy the resulting
    5938{{{dist/xslt-0.X-pyY.Z.egg}}} to your plugins directory.
    6039
    61 == Source ==
     40== Source
    6241
    63 You can check out XsltMacro from [http://trac-hacks.org/svn/xsltmacro here]
    64 using Subversion, or [source:xsltmacro browse the source] with Trac.
     42You can check out XsltMacro from [/svn/xsltmacro here] using Subversion, or [source:xsltmacro browse the source] with Trac.
    6543
    66 == Example ==
     44== Example
    6745
    6846The following table is produced with this macro call:
     
    7048[[Xslt(format.xsl, info.xml)]]
    7149}}}
    72 {{{
    73 #!html
     50
     51{{{#!html
    7452<table border="1">
    7553<tr>
     
    9876For the full docs see the WikiMacros page after installing this macro.
    9977
    100 == Recent Changes ==
     78== Recent Changes
    10179
    10280[[ChangeLog(xsltmacro, 3)]]
    10381
    104 == Author/Contributors ==
     82== Author/Contributors
    10583
    10684'''Author:''' [wiki:roadrunner] [[BR]]
    107 '''Maintainer:''' [wiki:roadrunner] [[BR]]
     85'''Maintainer:''' [[Maintainer]] [[BR]]
    10886'''Contributors:''' wuxxin at gmail.com
    10987
    110 == User Comments ==
     88== User Comments
    11189
    112 ==== Comment by anonymous on Ma 06 iun 2006 06:46:14 EST ====
     90==== Comment by anonymous on Ma 06 iun 2006 06:46:14 EST
     91
    11392''A hacked version of Xslt.py able to use external url's as doc or style.''
    11493
     
    126105  wuxxin at gmail.com
    127106
     107==== Comment by roadrunner on Du 18 iun 2006 22:37:02 EST
    128108
    129 ==== Comment by roadrunner on Du 18 iun 2006 22:37:02 EST ====
    130109Excellent idea! Thank you. Committed (with some fixes and cleanups) as rev [906].
    131110
    132 ==== Comment by Andrei on Du 17 sep 2006 18:36:25 EST ====
     111==== Comment by Andrei on Du 17 sep 2006 18:36:25 EST
     112
    133113I would like to transform RSS output from WordPress and use Trac as my homepage and include a side blog section that links to the real blog.
    134114
    135 ==== Comment by roadrunner on Sat Sep 30 19:10:49 2006 ====
    136 You could probably (mis)use the wiki-toc css class for this (or
    137 better: provide some css of your own) and use a stylesheet along
    138 the lines of (untested):
     115==== Comment by roadrunner on Sat Sep 30 19:10:49 2006
     116
     117You could probably (mis)use the wiki-toc css class for this (or better: provide some css of your own) and use a stylesheet along the lines of (untested):
    139118{{{
    140119<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
     
    157136</xsl:stylesheet>
    158137}}}
    159 
    160 
    161 ==== Comment by anonymous on Tue Dec 26 02:07:17 2006 ====
    162 iframe is non-standard nowadays, is it possible to produce "object" tags instead too?
    163 
    164 
    165 ==== Comment by anonymous on Tue Dec 26 02:07:20 2006 ====
    166 iframe is non-standard nowadays, is it possible to produce "object" tags instead too?
    167 
    168 
    169 ==== Comment by roadrunner on Wed Jan  3 18:56:25 2007 ====
    170 Done. Available in the new 0.5 release.