[xmlsec] xml escaping of node content
Aleksey Sanin
aleksey@aleksey.com
Thu, 24 Jul 2003 08:45:29 -0700
This is a multi-part message in MIME format.
--------------020205080806000705000402
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Well, you are right. I don't think that xmlsec can do something about that.
This happens on libxml level.
Aleksey
Hårek Ryeng wrote:
> Upon adding an xpath transform my "'s are escaped into " - which
> is legal xml.
>
> But - alas - my not-so-xml-compliant-recipient won't have anything to
> do with it - and yes they should fix it, but until then:
>
> Is there a way to turn of escaping of legal xml characters and limit
> the escaping to the strictly illegal < and &?
>
>
>
> Probably not, I just had to ask...
>
>
>
> xmlNodeSetContent(xpathNode, expression); is probably the function who
> does the escape magic, so this question is better asked to the libxml2
> guys?
>
>
>
>
>
>
>
> W | Hårek Ryeng, Senior System Developer
> E | Well Diagnostics AS, Forskningsparken, 9291 Tromsø
> L | Tel: +47 77 75 76 79 (70), Cell: +47 970 05 022, Fax: +47 77 75 76 99
> L | http://www.welldiagnostics.com/
>
>
>
--------------020205080806000705000402
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Well, you are right. I don't think that xmlsec can do something about
that.<br>
This happens on libxml level.<br>
<br>
Aleksey<br>
<br>
Hårek Ryeng wrote:<br>
<blockquote type="cite"
cite="mid000001c351f1$7c781ac0$3b01a8c0@PCHaarek">
<meta http-equiv="Content-Type" content="text/html; ">
<meta name="ProgId" content="Word.Document">
<meta name="Generator" content="Microsoft Word 10">
<meta name="Originator" content="Microsoft Word 10">
<link rel="File-List" href="cid:filelist.xml@01C35202.3C336800">
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:DoNotRelyOnCSS/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:DocumentKind>DocumentEmail</w:DocumentKind>
<w:HyphenationZone>21</w:HyphenationZone>
<w:EnvelopeVis/>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]-->
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;
text-underline:single;}
span.EpostStil17
{mso-style-type:personal-compose;
mso-style-noshow:yes;
mso-ansi-font-size:10.0pt;
mso-bidi-font-size:10.0pt;
font-family:Arial;
mso-ascii-font-family:Arial;
mso-hansi-font-family:Arial;
mso-bidi-font-family:Arial;
color:windowtext;}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
@page Section1
{size:595.3pt 841.9pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;
mso-header-margin:35.4pt;
mso-footer-margin:35.4pt;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Vanlig tabell";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";}
</style>
<![endif]-->
<div class="Section1">
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB"
style="font-size: 10pt; font-family: Arial;">Upon adding an <span
class="SpellE">xpath</span> transform <span class="GramE">my ”</span>’s
are escaped into &<span class="SpellE">quot</span>; - which is
legal <span class="SpellE">xml</span>.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB"
style="font-size: 10pt; font-family: Arial;">But – alas – my not-so-<span
class="SpellE">xml</span>-compliant-recipient won’t have anything to
do
with it – and yes they should fix it, but until then:<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB"
style="font-size: 10pt; font-family: Arial;">Is there a way to turn of
escaping of legal <span class="SpellE">xml</span> characters and limit
the
escaping to the strictly illegal < and &?<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB"
style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB"
style="font-size: 10pt; font-family: Arial;">Probably not, I just had
to
ask…<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB"
style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><span class="SpellE"><span class="GramE"><font
size="2" face="Arial"><span lang="EN-GB"
style="font-size: 10pt; font-family: Arial;">xmlNodeSetContent</span></font></span></span><span
class="GramE"><font size="2" face="Arial"><span lang="EN-GB"
style="font-size: 10pt; font-family: Arial;">(</span></font></span><span
class="SpellE"><font size="2" face="Arial"><span lang="EN-GB"
style="font-size: 10pt; font-family: Arial;">xpathNode</span></font></span><font
size="2" face="Arial"><span lang="EN-GB"
style="font-size: 10pt; font-family: Arial;">, expression); is
probably the function who does the
escape magic, so this question is better asked to the libxml2 guys?<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB"
style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB"
style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN-GB"
style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";">W | Hårek Ryeng,
Senior System
Developer<br>
E | Well Diagnostics AS, Forskningsparken, 9291 Tromsø<br>
L | Tel: +47 77 75 76 79 (70), Cell: +47 970 05 022, Fax: +47 77 75 76
99<br>
L | </span></font><span style=""><a
href="http://www.welldiagnostics.com/"><font size="2"
face="Courier New"><span
style="font-size: 10pt; font-family: "Courier New";">http://www.welldiagnostics.com/</span></font></a></span><o:p></o:p></p>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span
style="font-size: 12pt;"><o:p> </o:p></span></font></p>
</div>
</blockquote>
<br>
</body>
</html>
--------------020205080806000705000402--