[prev in list] [next in list] [prev in thread] [next in thread] 

List:       velocity-dev
Subject:    [jira] Resolved: (VELTOOLS-97) MarkupTool
From:       "Nathan Bubna (JIRA)" <dev () velocity ! apache ! org>
Date:       2010-04-12 17:59:49
Message-ID: 14934239.1291271095189383.JavaMail.jira () thor
[Download RAW message or body]


     [ https://issues.apache.org/jira/browse/VELTOOLS-97?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel \
]

Nathan Bubna resolved VELTOOLS-97.
----------------------------------

    Fix Version/s: 2.0
                       (was: 2.x)
       Resolution: Fixed

> MarkupTool
> ----------
> 
> Key: VELTOOLS-97
> URL: https://issues.apache.org/jira/browse/VELTOOLS-97
> Project: Velocity Tools
> Issue Type: New Feature
> Components: GenericTools
> Affects Versions: 2.x
> Reporter: Nathan Bubna
> Priority: Minor
> Fix For: 2.0
> 
> 
> As i grow continually more fond of tools and less fond of macros (though things are \
> finally starting to look up for macros in 1.6 and the possibility of Raghu \
> implementing blockmacros), i find myself starting to wish for tools that aid with \
> markup (mostly html or xml).  The idea has occurred to me that i might find a \
> general MarkupTool for manipulating markup in flexible, repeatable ways.   The API \
> i have in mind might be used something like this: #set( $foo = \
> $markup.foo.attr('bar', 0) ) $foo
> #if( $foo.bar == 0 )
> $foo.body($text.danger).attr({'black' : 'white', 'zebras' : $crossing})
> #end
> which would output
> <foo bar="0"/>
> <foo bar="0" black="white" zebras="crossing">Danger!</foo>
> It's also not hard to imagine ways to allow default attributes/values for various \
> tags in the configuration for the tool, like  <tool \
> class="org.apache.velocity.tools.generic.MarkupTool" img="border:0,class:thumb"/> \
> So that doing just $markup.img.attr('src',$imglink)
> would produce something like
> <img border="0" class="thumb" src="http://foo.com/bar.jpg"/>
> Granted, i don't have that many situations where this would be useful, but there \
> have been a few.  Also, i wonder if it might serve as a base class for a \
> JSPTaglibTool (see  \
> http://velocity.markmail.org/search/?q=jsp+tag#query:jsp%20tag%20from%3A%22Nathan%20Bubna%22+page:2+mid:ebotko7hanut3uhx+state:results \
> for more on this)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: \
                https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic