Markus Redeker wrote:
> 
> I want to display in the editor the target of the processing 
> instructions that appear in a Docbook file. (It is necessary because I 
> use both dbfo and dbhtml processing instructions.) This has turned out 
> to be extremely difficult.
> 
> It was possible for me to replace the content (as in 
> http://www.xmlmind.com/xmleditor/_distrib/doc/csssupport/pi_comments.html), 
> but then it could not be edited.
> 
> The best I can do now is to add
> 
> *:processing-instruction():before {
>     display: inline;
>     font-size: small;
>     color: #008000;
>     content: xpath('name(processing-instruction())'); }

"content: processing-instruction-target();" would have been simpler and
more efficient. See
http://www.xmlmind.com/xmleditor/_distrib/doc/csssupport/pi_comments.html



> to my customized stylesheet. But it doesn't work for a sequence of two 
> PIs where only the target of the first one is displayed. What is here 
> going on? 

Excerpts of
http://www.xmlmind.com/xmleditor/_distrib/doc/csssupport/pi_comments.html
---
Comments and processing instructions may have replaced content but not
generated content (:before, :after).
---

Therefore, "*:processing-instruction():before" has not much meaning for
XMLmind XML Editor.

I would recommend to do *nothing* *at* *all*:
[1] All processing instructions are by default displayed and editable.
[2] You can see their targets in the node path bar.

If you really, really, want to recognize dbfo and dbhtml at a glance,
well, simply colorize them. For example:

---
*:processing-instruction(dbfo) {
    color: navy;
    background-color: yellow;
}

*:processing-instruction(dbhtml) {
    color: maroon;
    background-color: yellow;
}
---



> (And why can't the editor treat a PI as "just another node"?)

I'm sorry but XMLmind XML Editor has a lot of such limitations. It will
take years to remove just a few of them.

Reply via email to