Understand the relationship between an XML document and Cascading Style Sheets (CSS) in Structured FrameMaker.
When an XML document is opened in Adobe FrameMaker, FrameMaker processes the Cascading Style Sheets 3 (CSS2) by mapping the CSS information to appropriate EDD rules in the EDD document.
The following scenarios describe the processing of CSS 3 in FrameMaker:
Open an EDD in FrameMaker. Choose Open dialog box appears and you can specify the CSS file. The CSS is then imported into the EDD. You can then import the element definitions from the EDD into a template to use when you open an XML file. If the EDD contains formatting rules, the CSS properties are appended to the existing rules if the properties are unique. Alternatively, the CSS properties you import will overwrite the existing formatting rules of the EDD. You can also export XML style information to an EDD for all elements in a document that use the CSS 3 format, using the Generate CSS2 option in the Structure menu.
. FrameMaker checks whether the current document is an EDD. If so, theWhen you open an XML file that is associated with a style sheet (using an XML Stylesheet PI), FrameMaker reads the DTD and the style sheet associated with the XML document, and then generates a temporary template to use for opening the XML file. However, if a template is already specified in the Structured Application (used to open the XML file), FrameMaker uses that template to open the XML file and will not generate any new template from the DTD and style sheets.
You can import element formatting from CSS 3 into EDD to ensure consistent formatting across different XML applications. The CSS file can be referenced in the XML document or manually imported. Multiple CSS files can be imported sequentially for multi-level formatting.
When importing element styles, FrameMaker retains the context information (element property or selector) from the CSS and imports it into the appropriate EDD contexts.
You can also set CSS preferences in XML using Structured FrameMaker. For more information, see the Developing Structured Applications with Adobe FrameMaker.
Open the EDD file in Structured FrameMaker.
Choose Import CSS dialog box appears.
. TheSelect a CSS file, and click Open.
If the Structured Application element in the EDD file doesn’t define an application name, the Use Structured Application dialog box appears. Select the Structured Application that was used to create the EDD file. Click Continue.
The CSS file is imported into the EDD file.
After importing the CSS styles, you can import element definitions from the EDD into a template and use the template to open an XML file.
As an alternative to the CSS import process, you can use FrameMaker to open an XML file that already has CSS styles associated with it. When you open the XML file, FrameMaker reads the DTD and CSS files and generates a temporary template that is used to open the XML file.
You can export XML style information available in your document for all elements using the Cascading Style Sheets 2 (CSS2) format, to an EDD file. You can then import these CSS Style definitions from the EDD file to new XML files. Cascading Style Sheets let authors attach styles, such as fonts and spacing, to structured XML files. CSS2 format is a W3C standard.
When you choose the Generate CSS2 command, styles from well-formed structured documents are generated, based on the formatting information available in the EDD associated with the source document. FrameMaker exports style information only at the element level. For example, if you apply a style to only one particular word in the Text element, that one instance of style is not exported.
You can set CSS2 preferences in the XML application. For example, you can determine whether the CSS2 file is automatically generated when you export to XML. For more information, see .
Open the template or document with an associated EDD in Structured FrameMaker.
Choose
.