Oxygen XML Editor provides support for selecting additional types of nodes. These custom selectors apply to: document, doctype sections, processing-instructions, comments, CDATA sections, reference sections, and entities. Processing-instructions are not displayed by default. To display them, open the Preferences dialog box, go to , and select Show processing instructions.
For the custom selectors to work in your CSS stylesheets, declare the Author mode extensions namespace at the beginning of the stylesheet documents:
@namespace oxy url('http://www.oxygenxml.com/extensions/author');
oxy|document {
display:block !important;
}
oxy|doctype {
display:block !important;
color:blue !important;
background-color:transparent !important;
}
oxy|processing-instruction {
display:block !important;
color:purple !important;
background-color:transparent !important;
}
<?target_name data="b"?>
oxy|processing-instruction[target_name]You can also match the processing instructions having a certain target and pseudo attribute value like:
oxy|processing-instruction[target_name][data="b"]
oxy|comment {
display:block !important;
color:green !important;
background-color:transparent !important;
}
oxy|cdata{
display:block !important;
color:gray !important;
background-color:transparent !important;
}
oxy|entity {
display:morph !important;
editable:false !important;
color:orange !important;
background-color:transparent !important;
}
To match particular entities, use the oxy|entity selector in expressions
such
as:oxy|entity[name='amp'],
oxy|entity[name='lt'],
oxy|entity[name='gt'],
oxy|entity[name='quot'],
oxy|entity[name='apos'],
oxy|entity[name^='#']{
-oxy-display-tags: none;
}
You can use the reference property to customize the way these references are rendered in Author mode:
oxy|reference {
border:1px solid gray !important;
}
In the Author mode, content is highlighted when text contains comments and changes (if Track Changes was active when the content was modified).
If this content is referenced, the Author mode does not display the highlighted areas in the new context. If you want to mark the existence of this comments and changes you can use the oxy|reference[comments], oxy|reference[changeTracking], and oxy|reference[changeTracking][comments] selectors.
The following example represents the customization of the reference fragments that contain comments:
oxy|reference[comments]:before {
content: "Comments: " attr(comments) !important;
}
To match reference fragments based on the fact that they contain change tracking inside, use the oxy|reference[changeTracking] selector.
oxy|reference[changeTracking]:before {
content: "Change tracking: " attr(changeTracking) !important;
}
Here is an example of how you can set a custom color to the reference containing both track changes and comments:
oxy|reference[changeTracking][comments]:before {
content: "Change tracking: " attr(changeTracking) " and comments: " attr(comments) !important;
}
A sample document rendered using these rules: