<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<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@01C34C56.ADD965B0">
<!--[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]-->
</head>

<body lang=NO-BOK link=blue vlink=purple style='tab-interval:35.4pt'>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>Hi Aleksey!<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>I&#8217;m using xmlsec 1.0.2.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>The transform I&#8217;m
trying to add to my envelope <span class=SpellE>uri</span> reference element (<span
class=SpellE>uri</span>=&#8221;&#8221;) is:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>&lt;<span class=SpellE>ds<span
class=GramE>:XPath</span></span> <span class=SpellE>xmlns:SOAP-ENV</span>=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><span style='mso-tab-count:
2'>                        </span><span class=GramE>not(</span><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><span style='mso-tab-count:
3'>                                   </span>ancestor-or-<span class=SpellE>self::node</span>()[@SOAP-<span
class=SpellE>ENV:actor</span>=&quot;<span class=SpellE>urn:oasis:names:tc:ebxml-msg:actor:nextMSH</span>&quot;]
| <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><span style='mso-tab-count:
3'>                                   </span><span class=GramE>ancestor-or-<span
class=SpellE>self</span></span><span class=SpellE>::node</span>()[@SOAP-<span
class=SpellE>ENV:actor</span>=&quot;http://schemas.xmlsoap.org/soap/actor/next&quot;]<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><span style='mso-tab-count:
2'>                        </span><span style='mso-spacerun:yes'>   </span>)<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>&lt;/<span class=SpellE>ds<span
class=GramE>:XPath</span></span>&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>However I&#8217;m unable to
make it work in <span class=SpellE>xmlsec</span>&#8230;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>There seems to be two
problems:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>1) Quotation marks are not
included in the resulting <span class=SpellE>XPATH</span> element.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>2) More than one namespace in
an attribute doesn&#8217;t work (probably caused by me messing with the
quotation marks).<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>This works: string <span
class=SpellE>xpathExpression</span> = &quot;<span class=GramE>not(</span>ancestor-or-<span
class=SpellE>self::node</span>()[@SOAP-<span class=SpellE>ENV:actor</span>=&#8221;&#8221;<span
class=SpellE>urn:ebxml-msg</span>&#8221;&#8221;])&quot;; <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>This don&#8217;t:<span
style='mso-spacerun:yes'>  </span>string <span class=SpellE>xpathExpression</span>
= &quot;<span class=GramE>not(</span>ancestor-or-<span class=SpellE>self::node</span>()[@SOAP-<span
class=SpellE>ENV:actor</span>=&#8221;&#8221;<span class=SpellE>urn:oasis:ebxml-msg</span>&#8221;&#8221;])&quot;;<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:18.0pt'><font size=2 face=Arial><span
lang=EN-GB style='font-size:10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>Since I&#8217;m new to <span
class=SpellE>xpath</span> transforms it might be some minor syntactical
problems&#8230;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>Any tips?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><o:p>&nbsp;</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:10.0pt;font-family:Arial;
mso-ansi-language:EN-GB'>Fyi</span></font></span></span><font size=2
face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:Arial;
mso-ansi-language:EN-GB'>: my code is below:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>---------------------------------------------------<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><span class=GramE><font size=2 face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>string</span></font></span><font
size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:Arial;
mso-ansi-language:EN-GB'> <span class=SpellE>xpathExpression</span> =
&quot;not(ancestor-or-<span class=SpellE>self::node</span>()[@SOAP-<span
class=SpellE>ENV:actor</span>=&#8221;&#8221;<span class=SpellE>urn:oasis:ebxml-msg</span>&#8221;&#8221;])&quot;;
// partial expression test<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><o:p>&nbsp;</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:10.0pt;font-family:Arial;
mso-ansi-language:EN-GB'>xmlNodePtr</span></font></span></span><font size=2
face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:Arial;
mso-ansi-language:EN-GB'> <span class=SpellE>transformNode</span> = <span
class=SpellE>xmlSecTmplReferenceAddTransform</span>(<span class=SpellE>referenceNode</span>,
<span class=SpellE>xmlSecTransformXPathId</span>);<o:p></o:p></span></font></p>

<p class=MsoNormal><span class=GramE><font size=2 face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>if(</span></font></span><span
class=SpellE><font size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;
font-family:Arial;mso-ansi-language:EN-GB'>transformNode</span></font></span><font
size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:Arial;
mso-ansi-language:EN-GB'> == NULL) <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>{<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><span style='mso-tab-count:
1'>            </span><span class=SpellE>m_lastError</span> = &quot;Failed to
add <span class=SpellE>XPath</span> transform&quot;;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><span style='mso-tab-count:
1'>            </span><span class=GramE>return(</span>NULL);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>}<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><span class=GramE><font size=2 face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>if</span></font></span><font
size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:Arial;
mso-ansi-language:EN-GB'> (<span class=SpellE>xmlSecTmplTransformAddXPath</span>(<span
class=SpellE>transformNode</span>, <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-indent:35.4pt'><font size=2 face=Arial><span
lang=EN-GB style='font-size:10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><span
style='mso-spacerun:yes'> </span>(<span class=GramE>const</span> unsigned
char*)<span class=SpellE>xpathExpression.c_str</span>(),<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><span style='mso-tab-count:
1'>            </span><span style='mso-spacerun:yes'> </span>NULL<span
class=GramE>) !</span>= 0)<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>{<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-indent:35.4pt'><span class=SpellE><font size=2
face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:Arial;
mso-ansi-language:EN-GB'>m_lastError</span></font></span><font size=2
face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:Arial;
mso-ansi-language:EN-GB'> = &quot;Failed to add <span class=SpellE>XPath</span>
expression&quot;;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><span style='mso-tab-count:
1'>            </span><span class=GramE>return(</span>NULL);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>}<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New";mso-ansi-language:EN-GB;
mso-no-proof:yes'>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='mso-no-proof:yes'><a
href="http://www.welldiagnostics.com/"><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";mso-ansi-language:
EN-GB'>http://www.welldiagnostics.com/</span></font></a><a
href="http://www.welldiagnostics.com/"></a></span><span lang=EN-GB
style='mso-ansi-language:EN-GB'><o:p></o:p></span></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-GB
style='font-size:12.0pt;mso-ansi-language:EN-GB'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>