Loading ...
Sorry, an error occurred while loading the content.

Re: [emacs-nxml-mode] XHTML and ZPT (tal & metal)

Expand Messages
  • Reinout van Rees
    ... The problem is that nxml s schema validation doesn t know about all the extra tal:something and -like elements. It might be worthwile to make
    Message 1 of 3 , Jan 14, 2006
    • 0 Attachment
      Rakotomandimby Mihamina wrote:
      > Hi,
      >
      > I have been recommended by my workmates to use nxml for editing XHTML
      > and ZPT
      > (http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/ZPT.stx).
      >
      > The nxml-mode displays the code to be "invalid" for ZPT documents and
      > my basic HTML code.
      > I put the mess in a ZPT document and would like to indent my code, like
      > this, for example:
      > https://svn.nuxeo.org/trac/pub/file/CalZope/trunk/browser/calendar_edit.pt
      >
      > What are the tips and tricks to do so?
      > Is is a big problem that nxml finds my code "invalid"?
      > (it displays "nXML Invalid" in the major mode...)

      The problem is that nxml's schema validation doesn't know about all
      the extra tal:something and <tal:block>-like elements. It might be
      worthwile to make your own special rng-schema for these kind of
      documents that mix xhtml with tal: and metal:.

      On the other hand, I use nxml to edit ZPT files every day and I'm not
      that bothered by the "hey, I don't know this attribute" warnings. Nxml
      *does* detect non-matching closing tags or other xml-related errors just
      fine. And it indents the code like a charm.

      So: as long as you use your tal:attributes and your tal:condition in the
      right places, nxml-mode is an excellent choice :-)

      Reinout

      --
      Reinout van Rees r.van.rees@...
      http://vanrees.org/weblog/ http://zestsoftware.nl/
      "Military engineers build missiles. Civil engineers build targets."
    Your message has been successfully submitted and would be delivered to recipients shortly.