cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

How to put line return in custom table cell generated by Xpath string

ptc-5116136
1-Newbie

How to put line return in custom table cell generated by Xpath string

Good day! I have an interesting problem. At least, interesting to me.

I have a custom table, and it has a few cells that are generated by Xpath strings.

What I would like to do is generate a custom table cell from an Xpath string that incorporates the content of two tags. No problem. But I would like to put a line return between those two instances. I'm not sure if there's a way to do this.

Here's an example of what I'm trying to do.

concat(string(tagx[1]/tagy/tagz), '{this is where the line return should be'}, string(tagx[2]/tagy/tagz))

I have control of the stylesheet, made via Arbortext with Styler, but by contract I cannot alter the DTD.

I have attempted to put various iterations of line returns, but they don't get called as line returns for the PDF. They just appear as the text that would constitute a line return in XML. In other words, '
' literally appears in the PDF as 
 and not as a line return.

Xpath is not my strong suit, so I may be going about this all wrong.

I appreciate your consideration!

2 REPLIES 2

Arbortext supports quite a few special PIs that let you control the formatting. I think the one you are looking for is the <?Pub _newline?> processing instruction. If you can get that appearing in your output (as a PI and not as the literal text string) then Arbortext will create a new line during formatting.

The help system documents most if not all of the PIs, and you can also find them by using Styler's generated text editor and going to the (from memory) Format menu and picking items from there. Eg. font change, line/page breaks, colour change.

Hi! Thank you for your help.

Putting the PI into the Xpath string unfortunately did not work, because it only appeared as a literal string. However, what did work is putting the PI into the content of "tagz" above -- in this case, when Xpath calls the tag content, the PI is part of this, and so it does indeed get incorporated as a PI and the carriage return appears.

Problem solved!

Announcements