Skip to main content
10-Marble
July 28, 2022
Question

Query builder to extract links from XML EPMdocument (DITA MAP)

  • July 28, 2022
  • 1 reply
  • 960 views

We are trying to build a query that:

 

A) Use an XML DITA map (EPMdocument) as our primary file

B) From the XML DITA map file, extract all the links to other EPMdocuments

C) The EPMdocument links are found in the "topicref" elements (href attribute)

D) Get the ID, name and author for each link.

 

Sample  XML DITA map:

<bookmap>

.....

<chapter>
    <topicmeta><navtitle>Introduction &amp; General Description</navtitle></topicmeta>
    <topicref href="windcillEPMdocLink1.dita"/>
    <topicref href="windcillEPMdocLink2.dita"/>
</chapter>

...

</bookmap>

 

Result XML:

<REQS>

  <REQ id=".." link="windcillEPMdocLink1.dita"><name>...</name><author>...</author>  </REQ>

   <REQ id=".." link="windcillEPMdocLink2.dita"><name>...</name><author>...</author></REQ>

</REQS>

1 reply

10-Marble
July 30, 2022

The question is: does query builder support XPATH? or some method to extract XML content?

18-Opal
August 1, 2022

You can certainly read a file using “Java Method” functionality in Query Builder.

 

So yes, what you want to do is possible.