Don Day wrote:
> 
> In the legacy docs that I am viewing with XXE 2.0b1, any text in a comment
> or in a PI (following the first token in the PI) is showing up as if it
> were content in whatever element contains it.  That is, if I have a PI like
> <?Pub Caret?> within a magenta phrase, the string "Caret" becomes visually
> part of the magenta content of that phrase.  In the tree view, I can see
> that the PI is still independent... its just that its text following the
> first string token is not sequestered visually.  The same is true for the
> entire content of <!-- comment text like this -->.

This happens because your CSS stylesheet does not specify a style for
PIs and comments.
(Remember that default style is just "display:inline".)

> First, is this visualization within the doc view intended? 

Yes.

> I would cause these items to be kept out of the doc view...

You can do that if you prefer.

> this is what happens now for the first token in a PI, 
> and should happen for the whole PI and comment
> structures.

The first token of the PI is its target and is treated like a
pseudo-attribute, not as part of the content of the PI. 

* The PI target can be edited using "Edit|Processing Intruction|Change
Processing Instruction Target..."
* The PI target can be used in the CSS style of a PI, for example in
generated content.

> Second, is there a suggested CSS selector for these that I can use for now
> in a stylesheet to provide alternate specific rendering for these metadata
> bits within the doc view (such as display: tree, at least)?

The "Power User's Guide" mainly describes two things:
[1] How to write configurations for XXE.
[2] How to write stylesheets for XXE (i.e. restrictions and extensions
to CSS2).

What follows are CSS snippets for styling PI and comments. For now,
please try to guess how they work:

Snippet 1:
------------------------
*:comment,
*:processing-instruction {
    padding: 2px;
    font-size: smaller;
    font-family: monospace;
}

*:comment {
    border: thin solid rgb(128, 128, 0);
    background-color: rgb(192, 192, 128);
}

*:processing-instruction {
    border: thin solid rgb(0, 128, 0);
    background-color: rgb(192, 255, 192);
}

*:comment,
*:processing-instruction {
    display: block;
    white-space: pre;
    margin: 2px;
}
------------------------

Snippet 2:
------------------------
*:comment,
*:processing-instruction {
    display: none;
}
------------------------

Snippet 3:
-------------------------
*:comment {
    content: icon(diamond);
}

*:processing-instruction {
    content: concatenate("'", processing-instruction-target(), "'");
}
-------------------------

Note that you can use selectors more complex than "*:comment" or
"*:processing-instruction". Example:

-------------------------
body:comment {
    display: block;
}

table *:comment {
    display: none;
}
-------------------------

Reply via email to