I have the following condition:
is a device that receives XSLT from the web interface and Embeds XSLT in XML file (someone should have been removed). "Unfortunately," I work in a French-speaking country and therefore there are many words with accent in XSLT when XSLT gets embedded in XML, the tool converts all accents to their HTML code (Icute, IGraw, etc.) .
My Pearl code is recovering XSLT from XML and executing it is against another XML using the Xalan command line tool XSLT has some justification when Xalan tool throws an exception is.
I started initially to a regexp to change all the accents in the XSLT user:
# and the code has been omitted because this page will be provided in $ xslt = ~ S / aacute; / A / GSO; $ Xslt = ~ s / aacute; / Á / gso; $ Xslt = ~ s / Agrave; / À / gso; $ Xslt = ~ s / acirc; / A / GSO; $ Xslt = ~ s / agrave; / A / gso;
But doing so means that I will have to write a regexp for each accent code ....
My question is, to do this without writing any of the repens Is the code? (Thinking that the only solution is to vomit.)
The way the Toulouse team is, and it is useless .....
Edit: I forgot to tell that I only need a Pearl solution, security does not allow me to install any kind of LIBOS, which has not checked them for a week or so long: (
You can try something. From POD:
HTML :: Entities ; $ A = "V & amp; aring; N Orske Tech and Aslash; R & amp; # 230Crace; DeckD_Intits ($ A); #Ncod_Centi ($ A, "\ 200- \ 377"); ## Not Required for What You Are Doing
< / Pre>In response to your edit, the HTML :: Entity is not in the Perl Core, it may still be installed on your system because it is used by many other libraries. You can check this command by running Are:
perl -mHTML :: Entities -le 'print "if it prints, then it will be located in' '
Comments
Post a Comment