Re: [PATCH] xdocs/stylesheets/site.vsl
On 1/28/02 2:35 PM, Jon Scott Stevens [EMAIL PROTECTED] wrote: on 1/28/02 6:13 AM, Ceki Gulcu [EMAIL PROTECTED] wrote: I have modified xdocs/stylesheets/site.vsl so that meta elements in the XML file are translated into meta tags in the HTML header. This is useful for example to add keyword meta tags which make it easy for search engines to categorize the page. HA! My evil plan worked. Now I can say that Ceki writes Velocity code. :-) Who's next? Craig... :- -- Geir Magnusson Jr. [EMAIL PROTECTED] System and Software Consulting You're going to end up getting pissed at your software anyway, so you might as well not pay for it. Try Open Source. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [PATCH] xdocs/stylesheets/site.vsl
Hi Ceki, do you know if the site.xsl has the same ability already? If not, we'll need to patch that one too. Also, the tag documentation should be updated whenever a new tag is introduced. I'll test the site.xsl here and if it needs a patch will create one too. Ceki Gulcu wrote: Hello, I have modified xdocs/stylesheets/site.vsl so that meta elements in the XML file are translated into meta tags in the HTML header. This is useful for example to add keyword meta tags which make it easy for search engines to categorize the page. The addition is very simple and consists of the printMeta macro and an iteration on all meta elements in $root. It's nothing much, possibly buggy and most definitely not as elegant as it should be. (I know very little about velocity and even less about anakia.) I have not applied the patch pending approval. Regards, Ceki Index: xdocs/stylesheets/site.vsl === RCS file: /home/cvs/jakarta-site2/xdocs/stylesheets/site.vsl,v retrieving revision 1.23 diff -u -r1.23 site.vsl --- xdocs/stylesheets/site.vsl 4 Jan 2002 12:38:37 - 1.23 +++ xdocs/stylesheets/site.vsl 28 Jan 2002 13:53:52 - @@ -215,6 +215,11 @@ #end #end +#macro (printMeta $metaElement) +meta #set ($attribs = $metaElement.getAttributes()) +#foreach ($a in $attribs) $a.getName()=$a.getValue() #end / +#end + #macro (document) !-- == -- !-- Main Page Section -- @@ -228,6 +233,12 @@ #metaauthor ( $au.getText() $au.getAttributeValue(email) ) #end + #set ($metas = $root.getChildren(meta)) + +##Parse meta directives such as +##meta name=keyword content=jakarta, java/ +#foreach ($meta in $metas) #printMeta($meta) #end + title$project.getChild(title).getText() - $root.getChild(properties).getChild(title).getText()/title /head @@ -269,3 +280,8 @@ /body /html #end + + + + + -- dIon Gillard, Multitask Consulting http://www.multitask.com.au/developers -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [PATCH] xdocs/stylesheets/site.vsl
On 1/28/02 5:04 PM, dIon Gillard [EMAIL PROTECTED] wrote: Hi Ceki, do you know if the site.xsl has the same ability already? If not, we'll need to patch that one too. Also, the tag documentation should be updated whenever a new tag is introduced. I'll test the site.xsl here and if it needs a patch will create one too. It will need the patch. -- Geir Magnusson Jr. [EMAIL PROTECTED] System and Software Consulting Now what do we do? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [PATCH] xdocs/stylesheets/site.vsl
dIon Gillard wrote: Hi Ceki, do you know if the site.xsl has the same ability already? If not, we'll need to patch that one too. Also, the tag documentation should be updated whenever a new tag is introduced. I'll test the site.xsl here and if it needs a patch will create one too. I've changed site.xsl so that it matches the functionality added by Ceki and also updated the example doc and tag explanations. -- dIon Gillard, Multitask Consulting http://www.multitask.com.au/developers -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]