help: attribute highlight

Dev Man
2002-09-13
2002-09-16
  • Dev Man
    Dev Man
    2002-09-13

    hello,

    i am trying to configure PSGML to edit XML files.

    1. how can i get special highlight on an attribute of an element?  or is this not possible?  is suppose i am looking for a MARKUP-TYPE of  'attribute' or something like that, for sgml-markup-faces.

    2. how do i get colors automatically on loading the xml file?  i have my .emacs setup to define the faces, etc, and have (setq sgml-set-face t)  and (setq sgml-use-text-properties t) in it.  however, the colors don't show up when i load the xml file.  rather, i have to initiate some action, like 'move to end of element' on root element) before the text is parsed and color is shown.

     
    • A1. It is not possible.

      A2. I suggest setting the following three variables in your .emacs:

      (setq sgml-auto-activate-dtd t
            sgml-set-face t
            sgml-use-text-properties t)

      The main thing is `sgml-set-face'. Using `sgml-use-text-properties' will probably speed it up. The fontification only works when the DTD has been read, set `sgml-auto-activate-dtd' to get fontification immediately when the file is loaded.

       
    • Dev Man
      Dev Man
      2002-09-16

      Thanks for the reply.  My second problem is solved after following your suggestion.  I have opened Bug Request ID 609986 [enhancement request: attribute highlight] for the second problem.

       
      • Dev Man
        Dev Man
        2002-09-16

        Correction, sorry, I meant I opened the Request 609986 for the first problem, not the second one.