Expand my Community achievements bar.

SOLVED

Help Needed with XML Attribute Access (Bold/Italics)

Avatar

Level 2

Hi,

I have a form that displays data in livecycle designer. When someone imports an xml file into the form in Adobe Acrobat it should be able to display some data as bolded and some italicized based on the xml file.

Here is the sample xml file

<Table1>

     <Row1>

          <Cell1 style="none">1</Cell1>

          <Cell2 style="bold">2</Cell2>

          <Cell3 style="italics">3</Cell3>

     </Row1>

</Table1>

And the output should be:

1 2 3

Can someone please help! If the xml file should be designed differently please let me know.

Thank you!

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

The Rich Text implementation uses xHTML to set the font stylings. I suggest that you create a RichText Field on your form set the text the way you want then export the data to see how the stylings are represented.

Paul

View solution in original post

4 Replies

Avatar

Correct answer by
Former Community Member

The Rich Text implementation uses xHTML to set the font stylings. I suggest that you create a RichText Field on your form set the text the way you want then export the data to see how the stylings are represented.

Paul

Avatar

Level 2

Paul,

Thanks for the help! I tried it out and it worked. One last question please. According to your explanation I added to the xml file the tags

<body xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" xmlns="http://www.w3.org/1999/xhtml" xfa:APIVersion="Acroform:2.7.0.0" xfa:spec="2.1">

<p style="font-weight:bold;">2</p>
</body>
do I need to place this body tag around each number or can I place it in one location in the xml file?
Thanks again.

Avatar

Former Community Member

Unfortunately each field that references xHTML needs that structure.

Paul

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----