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

Re: [emacs-nxml-mode] Feature request regarding schema locating files

Expand Messages
  • cabo@tzi.uni-bremen.de
    ... Aha! Here is my personal list of top editing functions from PSGML that seem to be harder to do in nXML, sorted by my ranking of their usefulness: * C-c RET
    Message 1 of 34 , Nov 1, 2003
    • 0 Attachment
      > Requesting features already mentioned in the TODO helps me prioritize.

      Aha!

      Here is my personal list of top editing functions from PSGML that seem
      to be harder to do in nXML, sorted by my ranking of their usefulness:

      * C-c RET (splitting an element)
      Something like this is extremely useful when typing text.
      (This is actually listed in TODO.)

      * C-c C-r (encasing a region in a new element)
      Some of the need for this is answered by C-c C-d, but it is still
      useful for quickly generating valid XML. (Listed in TODO.)

      * C-c = (change element type)
      Would have to be bound to a different key, IIRC.
      Saves quite a bit of navigating around...

      * C-c C-e (new element)
      This is probably more about retraining fingers, but one rather useful
      thing is that the mandatory substructure is automatically created as
      well (this aspect, and a nice way to handle choice, is listed in TODO).

      * C-c + (add attribute)
      Would have to be renamed, IIRC. Maybe I haven't quite grokked how to
      efficiently enter attribute values in nXML, but some functionality
      that adds (and, possibly, changes!) well-formed attributes would help.

      * C-c - (move element content into surrounding element and delete element)
      Again, would have to be renamed. Quite useful for getting rid of an
      emphasis etc. quickly.

      Maybe there is a philosophical difference: With PSGML (at least in the
      way I'm normally editing), the document generally remains valid (or at
      least well-formed) while editing. With nXML and the completion
      approach, I get cognitive dissonance while I'm still working on a
      half-entered element/attribute. Must be my brain.

      Of course, keeping the PSGML bindings (where Emacs-conforming) would
      help my fingers, but is not necessary at all. I'm more interested in
      the functionality.
      By the way, I would propose to apply key bindings somewhat
      conservatively -- there are only about 26 useful ones... E.g.,
      instead of C-c C-s and C-c C-w I would probably create a Schema prefix
      (e.g., C-c C-s) and change the commands to C-c C-s C-s (set schema)
      and C-c C-s C-w (which schema). Leaves C-c C-w for the next great
      feature.


      Gruesse, Carsten
    • James Clark
      ... It s still going to be a little tedious depending on how many levels your tree has, since you would have to do
      Message 34 of 34 , Nov 12, 2003
      • 0 Attachment
        On Sat, 2003-11-08 at 20:41, Norman Walsh wrote:

        > | pathPattern would have to match one or more complete path segments
        > | ending with the last path segment. Only * would be special and would
        > | match zero or more characters other than /. Then
        >
        > I think this would solve a problem I'm having, though perhaps I'm
        > overlooking a simpler solution.
        >
        > I have a tree of documents, /rooted/somewhere/..., and I want to apply
        > a documentElement rule in that tree. Unfortunately, the documents are
        > just a customization of DocBook so they're not, on the face of things,
        > distinguishable from other DocBook documents except by the fact that
        > they're in that tree.
        >
        > There are lots of directories under there and I don't want to put a
        > schemas.xml file in all of them.

        It's still going to be a little tedious depending on how many levels
        your tree has, since you would have to do

        <uri pattern="/rooted/somewhere/*" .../>
        <uri pattern="/rooted/somewhere/*/*" .../>
        <uri pattern="/rooted/somewhere/*/*/*" .../>
        etc.

        One could fix this by allowing a ** wildcard as in Ant.

        James
      Your message has been successfully submitted and would be delivered to recipients shortly.