Skip to main content
Participating Frequently
December 4, 2014
Question

XPath in Structured FrameMaker?

  • December 4, 2014
  • 1 reply
  • 399 views

Hello All,

We have a proprietary XML format. We've built a custom structured application (EDD, template, read/write rules) in FM12. How does FrameMaker support XPath (or anything that works similarly to XPath)? Is it possible to manipulate our custom XML elements using XPath and/or ExtendScript? For example, is it possible to find an element by an XPath query or something similar to XPath programmatically?

Many thanks!

This topic has been closed for replies.

1 reply

ScottPrentice
Inspiring
December 4, 2014

Hi Alex...

FM12 does support XPath interactively in the code view, but I don't think there's an API for it. One option is to use the API for FrameSLT provided by WestStreet Consulting ..

     http://www.weststreetconsulting.com/WSC_FrameSLT.htm

While you're there be sure to grab the ExtendScript examples ..

     http://www.weststreetconsulting.com/WSC_ExtendScriptSamples.htm

Great stuff!

...scott

Participating Frequently
December 4, 2014

Hi Scott,

Thank you! Does it mean that without FrameSLT there is no way to run XPath queries from ExtendScript?

Alex

ScottPrentice
Inspiring
December 4, 2014

That's my understanding. I'm not aware of an API to XPath in FM. It would be great if someone were to tell me that's incorrect!

Note that FrameSLT does not technically do "XPath" either .. similar in concept, but it's different.

...scott