Skip to main content
3-Newcomer
December 9, 2014
Solved

Burst configuration file, location rule for graphic objects

  • December 9, 2014
  • 1 reply
  • 3398 views

I use an xpath expression in a locrule to store document objects in a variable folder path location. I want to store graphic objects in the same folder as the parent document. But I get an error that says you cannot use xpath when sourcetype=graphic. Is there a way to do this?

Best answer by JeffStevenson

Hi Mike,

I would try the first suggestion before the 2nd. It's much less hassle. I lifted the 1st suggestion from a working bcf we have and replaced your Xpath.

If your graphic element is "image" then I would try...

<locnrule elementname="image" expr="concat(substring(/task/@id,1,1),'/',substring(/task/@id,2,1),'/',substring(/task/@id,3,1),'/',substring(/task/@id,4,2),'/',substring(/task/@id,6,1),'/',substring(/task/@id,1,8))"/>

-Jeff

1 reply

1-Visitor
December 9, 2014

The BCF should just see everything as elements. I'm not sure why it would have a problem.

Can you post your bcf file?

krussell3-NewcomerAuthor
3-Newcomer
December 10, 2014

Hi Jeff,

This is Mike Moore. I used my colleague Keith Russell's login before I set up my own account.

Attached are the BCF file and a screen shot of the error caused by the last three locrule elements. The xpath expressions in the first three locrule elements work fine. For example, if the id for the root element in a concept topic (DITA) is "INOTWD01-04", the first locrule element puts the document object in folder INOTWD01 in the following folder path:

I

N

O

TW

D

INOTWD01

In the last three locrule elements, I'm attempting to put any graphics that are usedin the topic in the same folder as the document object. I believe I must use the sourcetype attribute with a value of "graphic", not the elementname attribute to burst graphic objects.

Thanks,

Mike

1-Visitor
December 10, 2014

Hi Mike,

I would try the first suggestion before the 2nd. It's much less hassle. I lifted the 1st suggestion from a working bcf we have and replaced your Xpath.

If your graphic element is "image" then I would try...

<locnrule elementname="image" expr="concat(substring(/task/@id,1,1),'/',substring(/task/@id,2,1),'/',substring(/task/@id,3,1),'/',substring(/task/@id,4,2),'/',substring(/task/@id,6,1),'/',substring(/task/@id,1,8))"/>

-Jeff