[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]

Need some Zen to whilst writing MP4H/eperl macros along with output slices



Hi, I have a fairly largish set of <define-tags> written in the
following form [Many more languages also]

<define-tag title whitespace=delete>
<en: Hello>
<es: Yowsa>
</define-tag>

I am looking to convert these into

<title>
<![CDATA[
Hello
]]>
</title>

and an appropiate generation for other languages. I started to
experiment how I could write WML code to do this and I got stuck
whilst trying to build a generic tag which takes an appropiate
parameter

Any assistance would be appreciated ?


#use wml::std::tags
#use wml::std::lang

<lang:new id=en short>
<lang:new id=es short>

<define-tag title whitespace=delete>
<en: Hello>
<es: Yowsa>
</define-tag>

<define-tag xmltitle whitespace=delete>
<protect pass=2>
<title>
<![CDATA[
</protect>
<title>
<protect pass=2>
]]>
</title>
</protect>
</define-tag>

<define-tag genericxml whitespace=delete>
<perl>
<perl:assign $name>%0</perl:assign>
<perl:print>
<$name>
<![CDATA[
</perl:print>

# How do I input <$name> and interpolate
# Do I need to change pass order etc

<perl:print>
]]>
</$name>
</perl:print>
</perl>
</define-tag>


# Usage of the three tags

<title>
<xmltitle>
<genericxml title>


______________________________________________________________________
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com