Jeremy Quinn wrote:
> 
>>
>> See my answer about XXE non being namespace aware when the document 
>> conforms to a DTD.
>>
>> If this is the case, changing "./@{http://www.w3.org/1999/xlink}href"; 
>> to "./@xl:href" should fix the problem[*]
>>
>> ---
>> [*] After rereading the code of command "get", I've found a bug in the 
>> parser of the subset of XPath. "./@xl:href" should have worked, but 
>> will not work due to the bug. Sorry.
>>
> 
> So the previous fix you supplied to do with namespaces ( @xl\:href) 
> won't work here?

Unfortunately, it will not work. We'll fix the bug ASAP.



> 
> OK, I think my question was confusing, sorry.
> 
> I need to do the following:
> 
> 1. read the value from @xl:href
> 2. prepend a modification to the value found in step 1, to 'correct' the 
> filepath ie. ('../xml/'), to make it relative to the current document.
> 3. use the modified relative path value in the 'XXE.open' command, to 
> open the document referenced by the @xl:href in XMLMind.
> 
> eg. if @xl:href contains the value 'work/schematic.xml' the value I need 
> to pass to 'XXE.open' is '../xml/work/schematic.xml'.
> 

Sorry, I understand now.

What you need is a macro-command combining "get" and "XXE.open" (or 
"XXE.edit"), such as this one:

---
<command name="openLink">
   <macro>
     <sequence>
       <command name="get"
         parameter="[implicitElement] ./@xl:href" />
       <command name="XXE.open" parameter='%p/../xml/%_' />
     </sequence>
   </macro>
</command>
---

Notes:

* Do not use option "[file]" or "[URL]" of command "get". See 
http://lupo/xmleditor/_distrib/docs/poweruser/ar01s05s17.html

* Use "%p" which is the ``parent URL'' of the URL of the document being 
edited. See 
http://lupo/xmleditor/_distrib/docs/poweruser/ar01s04s02.html#macro

---
The bad news is that "./@xl:href" will be rejected by "get" because 
"get" has a small bug in its handling of XML 1.0 (i.e. not namespace 
aware) element and attribute names containing a ':'.



Reply via email to