Skip to main content
Jul 28, 2022 10:58 PM UTC
Question

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

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>

2 replies

Jul 30, 2022 4:42 PM UTC

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

Aug 1, 2022 8:44 PM UTC

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

 

So yes, what you want to do is possible.