What is the best way to escape characters for xsl-fo code generated by form widgets?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

What is the best way to escape characters for xsl-fo code generated by form widgets?

Jacopo Cappellato
Hi all,

I'd like to escape the special characters (not allowed in xsl-fo
template) from the data formatted by the form widget (see
org.ofbiz.widget.fo.FoFormRenderer.makeBlockString(...)).
Since I'm a lazy person and I don't want to reinvent the wheel, my
question is: what is the best way to escape these characters? Is there a
method that I can use for this?

Thanks,

Jacopo

Reply | Threaded
Open this post in threaded view
|

Re: What is the best way to escape characters for xsl-fo code generated by form widgets?

Si Chen-2
I just saw UtilFormatOut.encodeXmlValue(String inString):

           Encodes an XML string replacing the characters '<', '>',  
'"', ''', '&'

Maybe it'll do it?

Sounds like a good idea!


On Nov 24, 2006, at 8:50 AM, Jacopo Cappellato wrote:

> Hi all,
>
> I'd like to escape the special characters (not allowed in xsl-fo  
> template) from the data formatted by the form widget (see  
> org.ofbiz.widget.fo.FoFormRenderer.makeBlockString(...)).
> Since I'm a lazy person and I don't want to reinvent the wheel, my  
> question is: what is the best way to escape these characters? Is  
> there a method that I can use for this?
>
> Thanks,
>
> Jacopo

Best Regards,

Si
[hidden email]



Reply | Threaded
Open this post in threaded view
|

Re: What is the best way to escape characters for xsl-fo code generated by form widgets?

Jacopo Cappellato
Si,

that's exactly what I was looking for.

Thanks,

Jacopo

Si Chen wrote:

> I just saw UtilFormatOut.encodeXmlValue(String inString):
>
>           Encodes an XML string replacing the characters '<', '>', '"',
> ''', '&'
>
> Maybe it'll do it?
>
> Sounds like a good idea!
>
>
> On Nov 24, 2006, at 8:50 AM, Jacopo Cappellato wrote:
>
>> Hi all,
>>
>> I'd like to escape the special characters (not allowed in xsl-fo
>> template) from the data formatted by the form widget (see
>> org.ofbiz.widget.fo.FoFormRenderer.makeBlockString(...)).
>> Since I'm a lazy person and I don't want to reinvent the wheel, my
>> question is: what is the best way to escape these characters? Is there
>> a method that I can use for this?
>>
>> Thanks,
>>
>> Jacopo
>
> Best Regards,
>
> Si
> [hidden email]
>
>
>
>