In StyleVision you can import an HTML file and create the following documents based on it:
•An SPS document based on the design and structure of the imported HTML file.
•An XML Schema, in which HTML document components are created as schema elements or attributes. Optionally, additional elements and attributes that are not related to the HTML document can be created in the user-defined schema.
•An XML document with: (i) a structure based on the XML Schema you have created, and (ii) content from the HTML file.
•XSLT stylesheets based on the design in Design View.
The HTML Import mechanism, which enables the creation of XML files based on the imported HTML file, consists of the following steps:
|Creating New SPS via HTML Import. When an HTML file is imported into StyleVision, a new SPS document is created. The HTML document is displayed in Design View with HTML markup tags. A user-defined XML Schema with a document element called UserRoot is created in the Schema Tree window. This is the schema on which the SPS is based. The HTML document content and markup that is displayed in Design View at this point is included in the SPS as static content.
|Creating the Schema and SPS Design. Create the schema by (i) dragging components from the HTML document to the required location in the schema tree (in the Schema Tree window); and, optionally, (ii) adding your own nodes to the schema tree. In the Design Window, HTML content that has been used to build nodes in the schema tree will now be displayed with schema node tags around the content. HTML content that has no corresponding schema node will continue to be displayed without schema node tags.
|In the Design Document, assign formatting to nodes, refine processing rules, or add static content as required. These modifications will have an effect only on the SPS and the generated XSLT. It will not have an effect on either the generated schema or XML file.
|After you have completed the schema tree and the design of the SPS, you can generate and save the following:
•an XML Schema corresponding to the schema tree you have created;
•an XML data file with a structure based on the schema and content for schema nodes that are created with the (content) placeholder in the SPS design;
•a SPS (.sps file) and/or XSLT stylesheet based on your design.