IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Using substring function Options · View
newAtThis
Posted: Monday, November 2, 2009 9:19:58 AM
Rank: Newbie

Joined: 11/2/2009
Posts: 3
I am trying to use the substring function, but it doesn't seem to work at all.

I have an string element "abc 123" and want to use only the first part "abc". I have tried to right-click on the element and then edited the X-path filter. Tried the expression "substring(.,3)", but nothing happens.

I have also tried to enclose the element with a condition that containts the same expression as above, but still no result.

What am I doing wrong?
vlad
Posted: Monday, November 2, 2009 9:46:16 AM
Rank: Advanced Member

Joined: 12/13/2005
Posts: 2,856
Location: Mauritius
Well, unfortunately, you have tried the wrong things. XPath filter does not modify content - it allows you to filter out some of the elements. A condition is usually used in order to choose different design for the same content.

What you can choose is either replace (contents) with an auto-calc. Or with v2010 you can also use "Edit Template Match"

P.S. such questions can easily by answered by reading Help or opening sample files.
newAtThis
Posted: Monday, November 2, 2009 1:01:00 PM
Rank: Newbie

Joined: 11/2/2009
Posts: 3
Thank you, Vlad!

You saved me quite som head ache...
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.