Hello,

There is one parameter of the xs3p stylesheet which does exactly what you want: specify a CSS stylesheet for the result HTML documentation. It is called externalCSSURL and you have to specify it in the schemaDocumentation script on the line which applies the frameworks/xs3p/xs3p.xsl stylesheet to the XSD file. The value of the externalCSSURL parameter is a path to a local CSS file or a URL. The local file path must be specified relative to the location of the result HTML file. I attached the default internal CSS in case you need the class names used in the HTML elements.

A future version of <oXygen/> will publish the parameter in the user interface.


Best regards,
Sorin

http://www.oxygenxml.com/


Sorin Ristache wrote:
Hello,

All the customizable settings of the schema documentation generator are presented in the dialog which launches the generator. As the dialog shows the current version of <oXygen/> does not allow configuring the CSS stylesheet, colors, etc. for the HTML result but we added a feature request with that on our bugzilla. The XSLT stylesheet used to generate the documentation is almost the same as [oXygen-install-folder]/frameworks/xs3p/xs3p.xsl but you do not have access to it. You can see an example of using [oXygen-install-folder]/frameworks/xs3p/xs3p.xsl from the command line in the script [oXygen-install-folder]/schemaDocumentation.bat (or schemaDocumentation.sh for Mac OS X/Unix/Linux). Until the feature request is implemented the only possibility to set your own CSS file, colors, etc. is to modify this stylesheet and invoke it as in the schemaDocumentation.bat script.


Best regards,
Sorin

http://www.oxygenxml.com/


Christopher Smith wrote:

Hi there,

I was wondering if there is a place in the oxygen preferences, or a stylesheet, that is used when generating the schema documentation. I'd like to be able to change the default colors (for instance) used for the generated documentation.

I noticed that there is CSS information in the head of the generated documentation, but I was wondering if I can change this for all documentation that I generate, without needed to resort to post- generation editing or scripting.

Thanks,

-- Chris
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* More-configurable styles */

/******** General ********/

/* Document body */
body {
   color: Black;
   background-color: White;
   font-family: Arial, sans-serif;
   font-size: 10pt;
}
/* Horizontal rules */
hr {
   color: black;
}
/* Document title */
h1 {
   font-size: 18pt;
   letter-spacing: 2px;
   border-bottom: 1px #ccc solid;
   padding-top: 5px;
   padding-bottom: 5px;
}
/* Main section headers */
h2 {
   font-size: 14pt;
   letter-spacing: 1px;
}
/* Sub-section headers */
h3, h3 a, h3 span {
   font-size: 12pt;
   font-weight: bold;
   color: black;
}
/* Table displaying the properties of the schema components or the
   schema document itself */
table.properties th, table.properties th a {
   color: black;
   background-color: #F99; /* Pink */
}
table.properties td {
   background-color: #eee; /* Gray */
}

img{
 border: 0;
}         

/******** Table of Contents Section ********/

/* Controls for switching between printing and viewing modes */
div#printerControls {
   color: #963; /* Orange-brown */
}
/* Controls that can collapse or expand all XML Instance
   Representation and Schema Component Representation boxes */
div#globalControls {
   border: 2px solid #999;
}


/******** Schema Document Properties Section ********/

/* Table displaying the namespaces declared in the schema */
table.namespaces th {
   background-color: #ccc;
}
table.namespaces td {
   background-color: #eee;
}
/* Target namespace of the schema */
span.targetNS {
   color: #06C;
   font-weight: bold;
}


/******** Schema Components' Sections ********/

/* Name of schema component */
.name {
   color: #F93; /* Orange */
}

/* Hierarchy table */
table.hierarchy {
   border: 2px solid #999; /* Gray */
}

/* XML Instance Representation table */
div.sample div.contents {
   border: 1px dashed black;
}


/* Schema Component Representation table */
div.schemaComponent div.contents {
   border: 2px black solid;
}


/******** Glossary Section ********/

/* Glossary Terms */
.glossaryTerm {
   color: #036; /* Blue */
}


/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* Printer-version styles */

@media print {

/* Ensures that controls are hidden when printing */
div#printerControls {
   visibility: hidden;
}
div#globalControls {
   visibility: hidden;
}
#legend {
   display: none;
}
#legendTOC {
   display: none;
}
#glossary {
   display: none;
}
#glossaryTOC {
   display: none;
}

}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* Base styles */

/******** General ********/

/* Unordered lists */
ul {
   margin-left: 1.5em;
   margin-bottom: 0em;
}
/* Tables */
table {
   margin-top: 10px;
   margin-bottom: 10px;
   margin-left: 2px;
   margin-right: 2px;
}
table th, table td {
   font-size: 10pt;
   vertical-align: top;
   padding-top: 3px;
   padding-bottom: 3px;
   padding-left: 10px;
   padding-right: 10px;
}
table th {
   font-weight: bold;
   text-align: left;
}
/* Table displaying the properties of the schema components or the
   schema document itself */
table.properties {
   width: 90%;
}
table.properties th {
   width: 30%;
}
/* Boxes that can make its content appear and disappear*/
div.box {
   margin: 1em;
}
   /* Box caption */
div.box span.caption {
   font-weight: bold;
}
   /* Button to open and close the box */
div.box input.control {
   width: 1.4em;
   height: 1.4em;
   text-align: center;
   vertical-align: middle;
   font-size: 11pt;
}
   /* Box contents */
div.box div.contents {
   margin-top: 3px;
}


/******** Table of Contents Section ********/

/* Controls for switching between printing and viewing modes */
div#printerControls {
   white-space: nowrap;
   font-weight: bold;
   padding: 5px;
   margin: 5px;
}
/* Controls that can collapse or expand all XML Instance
   Representation and Schema Component Representation boxes */
div#globalControls {
   padding: 10px;
   margin: 5px;
}


/******** Schema Document Properties Section ********/

/* Table displaying the namespaces declared in the schema */
table.namespaces th {
}
table.namespaces td {
}
/* Target namespace of the schema */
span.targetNS {
}


/******** Schema Components' Sections ********/

/* Name of schema component */
.name {
}

/* Hierarchy table */
table.hierarchy {
   width: 90%;
}
table.hierarchy th {
   font-weight: normal;
   font-style: italic;
   width: 20%;
}
table.hierarchy th, table.hierarchy td {
   padding: 5px;
}

/* XML Instance Representation table */
div.sample {
   width: 90%;
}
div.sample div.contents {
   padding: 5px;
   font-family: Courier New, sans-serif;
   font-size: 10pt;
}
   /* Normal elements and attributes */
div.sample div.contents, div.sample div.contents a {
   color: black;
}
   /* Group Headers */
div.sample div.contents .group, div.sample div.contents .group a {
   color: #999; /* Light gray */
}
   /* Type Information */
div.sample div.contents .type, div.sample div.contents .type a {
   color: #999; /* Light gray */
}
   /* Occurrence Information */
div.sample div.contents .occurs, div.sample div.contents .occurs a {
   color: #999; /* Light gray */
}
   /* Fixed values */
div.sample div.contents .fixed {
   color: #063; /* Green */
   font-weight: bold;
}
   /* Simple type constraints */
div.sample div.contents .constraint, div.sample div.contents .constraint a {
   color: #999; /* Light gray */
}
   /* Elements and attributes inherited from base type */
div.sample div.contents .inherited, div.sample div.contents .inherited a {
   color: #666; /* Dark gray */
}
   /* Elements and attributes added to or changed from base type */
div.sample div.contents .newFields {
   font-weight: bold;
}
   /* Other type of information */
div.sample div.contents .other, div.sample div.contents .other a {
   color: #369; /* Blue */
   font-style: italic;
}
   /* Link to open up window displaying documentation */
div.sample div.contents a.documentation {
   text-decoration: none;
   padding-left: 3px;
   padding-right: 3px;
   padding-top: 0px;
   padding-bottom: 0px;
   font-weight: bold;
   font-size: 11pt;
   background-color: #FFD;
   color: #069;
}
   /* Invert colors when hovering over link to open up window 
      displaying documentation */
div.sample div.contents a.documentation:hover {
   color: #FFD;
   background-color: #069;
}

/* Schema Component Representation table */
div.schemaComponent {
   width: 90%;
}
div.schemaComponent div.contents {
   font-family: Courier New, sans-serif;
   font-size: 10pt;
   padding: 5px;
}
   /* Syntax characters */
div.schemaComponent div.contents {
   color: #00f; /* blue */
}
   /* Element and attribute tags */
div.schemaComponent div.contents .scTag {
   color: #933; /* maroon */
}
   /* Element and attribute content */
div.schemaComponent div.contents .scContent, div.schemaComponent div.contents .scContent a {
   color: black;
   font-weight: bold;
}
   /* Comments */
div.schemaComponent div.contents .comment {
   color: #999; /* Light gray */
}

/******** Legend Section ********/

div#legend table, div#legend div {
   margin-bottom: 3px;
}
div#legend div.hint {
   color: #999; /* Light gray */
   width: 90%;
   margin-left: 1em;
   margin-bottom: 2em;
}


/******** Glossary Section ********/

/* Glossary Terms */
.glossaryTerm {
   font-weight: bold;
}

/********* Details *************/
.detailsToc {
  color: #666; /* Light gray */
}

.details {
  color: #666; /* Light gray */
  text-decoration:none;
}

/******** Footer ********/

.footer {
   font-size: 8pt;
}
_______________________________________________
oXygen-user mailing list
[email protected]
http://www.oxygenxml.com/mailman/listinfo/oxygen-user

Reply via email to