Hi Hussein,

That is amazing!
I didn't realize that it is possible to use all XPath functions within a
<get>.
That offers me a bunch of new possibilities.

Thanks,
Roman

> -----Original Message-----
> From: Hussein Shafie [mailto:hussein at xmlmind.com] 
> Sent: Wednesday, December 13, 2006 11:01 AM
> To: Huditsch, Roman (LNG-VIE)
> Cc: xmleditor-support at xmlmind.com
> Subject: Re: [XXE] Getting the file name of the document 
> being edited without the drive letter
> 
> Huditsch, Roman (LNG-VIE) wrote:
> > 
> > Once again I have a very special requirement...
> 
> Special requirements are our speciality.
> 
> 
> 
> > I would need to pass the current file path ofthe document being 
> > edited, but witohout the drive letter on Windows.
> > R:\Lieferungen\Legislations\Gesetze\verlinkt\2_waeg_v0.xml
> > should become
> > \Lieferungen\Legislations\Gesetze\verlinkt\2_waeg_v0.xml
> > 
> > Is there some kind of a substring functionality somewhere?
> 
> In a macro, use <get> or <set>. Example:
> 
> <get expression="substring('%D', 3)" />
> 
> (3 because in XPath the index of first character is 1 and not 0.)
> 
> See
> http://www.xmlmind.com/xmleditor/_distrib/doc/commands/xpath_get.html
> http://www.xmlmind.com/xmleditor/_distrib/doc/commands/macro_vars.html
> http://www.w3.org/TR/xpath#section-String-Functions
> 
> 
> 
> > Or would I need to integrate an own java class for doing this?
> 
> No, this is probably not needed.
> 
> 

Reply via email to