You are viewing a plain text version of this content. The canonical link for it is here.
Posted to asp@perl.apache.org by Philip Mak <pm...@aaanime.net> on 2001/09/02 07:48:48 UTC

Must XMLSubs have a namespace?

On my site, I have an XMLSub that converts this:

<my:h1>Title Here</my:h1>

into something like this:

<table cellspacing=0 cellpadding=2 border=0 width="100%">
<tr><td class="h1">
Title Here
</td></tr>
<tr><td height=1 bgcolor="red">
<img src="spacer.gif" width=1 height=1>
</td></tr>
</table>

Is there any way I could have written it as <h1>Title Here</h1> and still
have Apache::ASP perform that conversion? (I tried using a stylesheet
command to change <h1> to the way I want it, but Netscape doesn't display
it correctly.)


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Re: Must XMLSubs have a namespace?

Posted by Joshua Chamas <jo...@chamas.com>.
Philip Mak wrote:
> 
> On my site, I have an XMLSub that converts this:
> 
> <my:h1>Title Here</my:h1>
> 
> into something like this:
> 
> <table cellspacing=0 cellpadding=2 border=0 width="100%">
> <tr><td class="h1">
> Title Here
> </td></tr>
> <tr><td height=1 bgcolor="red">
> <img src="spacer.gif" width=1 height=1>
> </td></tr>
> </table>
> 
> Is there any way I could have written it as <h1>Title Here</h1> and still
> have Apache::ASP perform that conversion? (I tried using a stylesheet
> command to change <h1> to the way I want it, but Netscape doesn't display
> it correctly.)

Yes, & then defined the subroutine in global.asa, or your
GlobalPackage namespace.  XMLSubsMatch could then look like h1|$other_tags
You might also consider using XMLSubsStrict so that attributes 
won't be interpreted as perl runtime expressions.

--Josh

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org