Tags:
css1Add my vote for this tag xml1Add my vote for this tag create new tag
, view all tags

PseudoXmlPlugin

This plugin allows the user to type just any tag, and have the twiki engine convert it to span employing the pseudo-tag as the span's class or id

Syntax Rules

<date>11 Oct 2003</date> would be renamed: <span class="date">11 Oct 2003</span>

  • psuedo-tags are numbers, upper and lowercase letters, hyphen (-), and the underscore (_) only
  • does not support tag properties (e.g,. id="name", width="320", etc.)
  • no extra spaces around the angle brackets

<#id>11 Oct 2003</id> would be renamed: <span id="date">11 Oct 2003</span>

Examples

<style>
.wiki      { background:green; color:white; }
.author    { background:%<nop>WEBBGCOLOR%; color:white; }
.bad       { background:red; }
.tags      { background:red; }
</style>
<wiki>Project Wiki</wiki> Project Wiki
<author>Steven Brust</author> Steven Brust
<wiki>wiki<author>author</author> more wiki</wiki> wikiauthor more wiki
<bad>bad tags</tags> bad tags

feel free to improve the examples by editing TWiki:Plugins/PseudoXmlPlugin

Caveats

  • Nested tags are now expanded, but I think I might have significantly impacted the performance frown
  • Multiline tags aren't handled correctly

PseudoXmlPlugin Global Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, i.e. %PSEUDOXMLPLUGIN_SHORTDESCRIPTION%

  • One line description, is shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = renders xml-like tags as span with class or id of the pseudo-tag

  • Debug plugin: (See output in data/debug.txt)
    • Set DEBUG = 0

Plugin Installation Instructions

Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.

  • Download the ZIP file from the Plugin web (see below)
  • Unzip PseudoXmlPlugin.zip in your twiki installation directory. Content:
    File: Description:
    data/TWiki/PseudoXmlPlugin.txt Plugin topic
    lib/TWiki/Plugins/PseudoXmlPlugin.pm Plugin Perl module
    data/Sandbox/TestTopicPseudoXmlPlugin.txt Plugin topic test
  • Test if the installation was successful:
<wiki>Project Wiki</wiki> Project Wiki
<author>Dr. Seuss</author> Dr. Seuss

Plugin Info

Plugin Author: TWiki:Main/WillNorris
Plugin Version: 12 Oct 2003 (V1.000)
Change History:  
12 Oct 2003: Initial version
14 Oct 2003: v1.001 - handles nested tags (but still not multiline tags)
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.005
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/PseudoXmlPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/PseudoXmlPluginDev

Related Topics: TWikiPreferences, TWikiPlugins

-- TWiki:Main/WillNorris - 12 Oct 2003

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatmd5 PseudoXmlPlugin.md5 r2 r1 manage 0.2 K 2008-12-12 - 11:53 SopanShewale checksum file , Uploaded as a part of Release Process
Compressed Zip archivetgz PseudoXmlPlugin.tgz r2 r1 manage 4.9 K 2008-12-12 - 11:53 SopanShewale See PseudoXmlPlugin for details. Untar and run the installer script, Uploaded as a part of Release Process
Compressed Zip archivezip PseudoXmlPlugin.zip r10 r9 r8 r7 r6 manage 6.8 K 2008-12-12 - 11:53 SopanShewale See PseudoXmlPlugin for details. Unzip and run the installer script , Uploaded as a part of Release Process
Unknown file formatEXT PseudoXmlPlugin_installer r2 r1 manage 3.4 K 2008-12-12 - 11:53 SopanShewale Installer Script, Uploaded as a part of Release Process
Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r10 - 2008-12-12 - SopanShewale
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.