Re: incorrect indentation according to element nesting depth after <tag/>

Steinar Bang <[email protected]> Wed, 11 Apr 2007 18:31:57 +0200
Newsgroups gmane.emacs.psgml.user
Organization Probably a good idea
Message-ID <[email protected]>
>>>>> Jochen Hayek <[email protected]>:

>>>>> Steinar Bang writes:
> This is what I was talking about,
> so that others have a little context:

>     <tag/>

> Let's call this an "opening tag, that's also immediately closed" for
> better understanding.

SB> I think that's supposed to happend automatically 

> The buffer is in xml mode, but it doesn't happen automatically.

> No, indentation is spoilt after <tag/> .

Hm... I'm unsure about what you mean with spoilt indentation, but I've
never seen any issues like this, in all the years I was using
psgml-mode.

Do you get any errors for the file in psgml?  What happens if you do
`C-c C-n'?

SB> if psgml is aware that your file is an XML file, 
SB> and not an SGML file.

> But that's valid syntax also for sgml mode, isn't it?!?

<tag/> is not valid SGML syntax.

<tag> or <tag></tag> are the only allowed SGML variants.

<tag> on the other hand, is never a legal construct in XML.

Ie. the SGML-described HTML can have <br>, while XHTML must have <br/>.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV