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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

How to style a new XML element for edit view if don't have Styler?

sfogel
1-Newbie

How to style a new XML element for edit view if don't have Styler?

Hi, all...



We use Arbortext but don't have a license for Styler, and we want to properly style an element we're introducing to the DTD. Actually, it's the inline element from DocBook 4.5, not supported by the current version of Arbortext. How to do this?



I added the following code to our *.style file underneath our custom/doctypes directory, and the code element is now being styled properly, but now all generated text (chapter and section numbers, section titles from xrefs) is getting many leading and trailing spaces or underscores.



    <element name="code" style="inline">


                           

          </context>

5 REPLIES 5

Hi Steve--



Chances are if you are not using Styler to edit the stylesheet, but are
editing it in a text editor (or in Arbortext as an XML file), the editor
added linebreaks and maybe indenting whitespace to "pretty print" the
XML. But in generated text, whitespace is treated as significant.



Try saving the file with nonsignificant whitespace removed, and that
should fix your problem. If you have trouble getting that to work, then
try reverting back to your original stylesheet, and open it in a plain
text editor, and make your change without doing any kind of element
indenting or adding new line breaks.



--Clay



Clay Helberg

Senior Consultant



TerraXML

1380 Forest Park Circle, Suite 100

Lafayette, CO 80027
sfogel
1-Newbie
(To:sfogel)

Right you are. I reverted the file and added my code without adding any white space, and the problem went away. Thanks so much!



Steve

You'll be pleased to know you are not the first person to ever have problems with XML and whitespace 🙂 I'd say it's got to be one of XML's biggest design flaws.

-Gareth
sfogel
1-Newbie
(To:sfogel)

J







HYPERLINK " \nOracle
Steve Fogel | Information Architect, Oracle Database | 650.506.4914
Oracle Server Technologies Information Development
500 Oracle Parkway | M/S 4op1126 | Redwood Shores, CA 94065


Right, that's how I recognized the problem right away. BTDT... 🙂



Clay Helberg

Senior Consultant



TerraXML

1380 Forest Park Circle, Suite 100

Lafayette, CO 80027
Top Tags