You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Wes Morgan <we...@slacknet.org> on 2001/06/15 19:20:37 UTC

disable-output-escaping needed in this situation?

I am trying to generate some Javascript with an XSLT stylesheet. I have 
to generate it with the stylesheet and put it in the document because 
the values that go into the Javascript function calls come from the data 
in the XML file itself. I am also putting HTML into the function calls, 
so this means that I must use ' to quote the strings (otherwise the " 
around the attributes in the HTML tags would confuse the Javascript 
parser). However, some of the data I am pulling from the XML files has 
apostrophes in it already, and I need to be able to include those in the 
final output. However, Cocoon insists on changing &apos; into '. This 
also confuses the Javascript parser. The apostrophes in the XML are 
entities (&apos;) so it would be ideal if I could tell Cocoon to stop 
turning them into '. I can't change the XML files so that they all say 
&amp;apos; (nor would I want to, yuck!), so what am I supposed to do? It 
doesn't seem like disable-output-escaping would be "bad programming 
practice" in this instance. Maybe I'm rushing to judgment here, but it 
seems that it was a poor design decision to *disable* something you 
think a "bad programming practice." After all, goto's in C still compile 
and work, but no C programmer worth her salt would *ever* use one, and 
that's because over the years we have more or less proven you can do 
anything w/o goto's that you can do with them, only better. If someone 
knows a way I can do this with the functionality already in Cocoon, I'll 
recant... :-)

-- 
Wes Morgan

wesm@slacknet.org
wmorga13@calvin.edu

Debian: apt-get into it.


-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

mQGiBDrckPYRBACX731+mhYmj3oFUCGclJFn3YfM3FCmuLoPxGCy5QtRzHZY4XtM
gQ54gSLkTNafhpLC0S+/BfYVpsumLrkif2AGTg0Dnuww0/xDSLKdWhFZUhcopRy5
xXBnz1PZQCJnCjDcSHl4RaVoywmKcZ3TfaDNnu1/RLtlr9tx5XNbWBnw3wCgntC+
lbCBz+LidCrRrEC2N/PlYpMD/0Icn7Uex7jRYcDx2R78cFKDpUGHMtx7VCzGyQbC
L3kz94mm1/aXt0ELqbq5k8qKPq80kXhJkx7jwSqn0V6XO9GAk85Dkk3GHm/iCli6
KhSzC4m485ZKvPKnEU3Nue9hgvC08YSjrfvXosEZsm5kwcniHphugbviW0C+AdmA
BWEoA/9qoxeIntesKq1MsUAXTgDCkT1BCBGn9YoxWhbiyz5iLPn4nTq2hwR1xqhQ
xztHYJkmSlBHeUIhAicPsk3U8gd9L5S3FEWrelm+1GRBhy1/HRBam33ypgg9U5i6
IDST1hqExj3WPG68pJsRl6TwKkrUGNIXi8/yl2ximBOYooFx7rQrV2VzIE1vcmdh
biAoQmFzc0hvbWJyZSkgPHdlc21Ac2xhY2tuZXQub3JnPohXBBMRAgAXBQI63JD2
BQsHCgMEAxUDAgMWAgECF4AACgkQVHVnnbHtaCXu9wCfQBJ5Vsep8waEZEP7cT5/
el7CIF4AoI3dZamvLWsMK7YPdatRNObsf6/guQENBDrckPoQBADZpcFo6MyA0rhP
q43mNdpfMJm4JnmD5kMnRSli/HDdLk2Epa3EY1wgMB6NovLr8fV/2cp/5KdXg8j/
V780qOZhpQpTL8AXvIw9yMAIwwpARpFl//VVK+3l1+IgzHRWiQC7SWhTsqIk4ppP
kRafwefx8r3KYFxljAmlV2zKNSiQrwADBQP+KDV3Lh/k3IHORiX1FV5fZALbJi+X
TTs+onMndtZyhIPpZ6Z6AMygdXa2WQy2U24tkvmMQdMuIOTCZiCuXsbnBw5FwwvL
tfSloF1R6xfvme8yATDZXJnPFUW5jFwwMto3Hnoh95MqJLfXTpu1FrBXVE4YVSJa
eA1FuaQJnnllGu+IRgQYEQIABgUCOtyQ+gAKCRBUdWedse1oJbQIAJ9uDRktfJHP
5veOAfncvrX99hnHKQCgmdySczcSbc9/YxTAJ+GfA1/OOtU=
=PCOv
-----END PGP PUBLIC KEY BLOCK-----





---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>