Indent problems... something I've not understood?

Questions about XML that are not covered by the other forums should go here.
DBeeson
Posts: 4
Joined: Fri Jul 14, 2006 8:04 pm

Indent problems... something I've not understood?

Post by DBeeson »

I'm not sure whether this is the right forum for this, as it's a problem I only have with <oxygen />, but since I suspect it's a problem of my understanding of the issue, I'll put it here.

This is an excerpt of a website I'm trying to build for a group of an online game. This like to another site is also an acronym, and I want to mark it up as such, but when i do so in <oxygen />, there is a problem with the indenting.

Code: Select all


play by the rules put forward by the roleplayers organisation <a class="ext" href="http://www.core-uo.com"><acronym title="Community of Roleplayers, Europa">'CoRE'</acronym></a>. </p>
Whenever i use the format and indent feature, it puts the <.a>.</p> tags on a new line. This means that when viewed in a browser, both the word CoRE and the space after it are shown as a link. Formatting it as shown still validates fine, and solves the problem in the browser, but oxygen always returns the closing tags to a new line when I use format and indent.

Code: Select all

  Europa">'CoRE'</acronym>
</a>. </p>
Is this (as usual!) something I've misunderstood behind the scenes? Is having text that is both a hyperlink and an acronym not allowed, and so the space is added to make them slightly different?
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi,

As inside a you have only an element (no text nodes) oXygen considers its content to be element only and indets the acronym element on a new line. To avoid this indenting you have a couple of option. One is to add the a element to the "Preserve space elements" in Options->Preferences -- Editor -- Format -- XML. Another option is to add xml:space="preserve" attribute inside the a element.

Best Regards,
George
Post Reply