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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

FOSI Xpath content as markup?

ClayHelberg
18-Opal

FOSI Xpath content as markup?

Hi FOSI gurus--

I have a FOSI issue I'm trying to sort out. In my document I need to have dynamically set footer information. I'm doing this by embedding a processing instruction containing the desired content at publishing time, and my stylesheet can pick up the content of the PI and stick it in the footer. With plain text content, this all works just fine, e.g.:

<?footer This is important information that should appear in the footer>

<document>

<title>Important document</title>

...etc.

So far so good. But, I would also like to be able to support markup in that string (escaped for the PI encoding). For example, I'd like to be able to support having a <?Pub _newline> in there, something like this:

<?footer This is important information&lt;?Pub _newline&gt;that should appear in the footer>

<document>

<title>Important document</title>

...etc.

so the footer would be rendered like so:

This is important information

that should appear in the footer.

I'm using #XPATHSTRING(...)#XPATH in my usetext to get the PI content, but when I display it I see the markup in the footer, like this:

This is important information&lt;Pub _newline&gt;that should appear in the footer.

So my question is: is there a way that I can tell the FOSI that I want it to parse the result of #XPATHSTRING and use it as markup? Or is there another way I can retrieve the content of that PI that will have the same effect?

Thanks.

--Clay

ACCEPTED SOLUTION

Accepted Solutions

Hi Clay,

Maybe a UFE will work instead of the PI.

Good luck!

Suzanne

View solution in original post

2 REPLIES 2

Hi Clay,

Maybe a UFE will work instead of the PI.

Good luck!

Suzanne

Thanks, Suzanne! It didn't occur to me to try using a UFE, since I'm adding the content via a dialog box and ACL before the document ever goes anywhere near PE or Styler, rather than using gentext in the stylesheet itself. But it seems to work OK. Now I just need to stop Editor from throwing context errors about the UFE (since that version of the document is a throw-away one-time print-only copy) and I should be in good shape.

--Clay

Announcements

Top Tags