Copyright: Copyright © Corel Corporation Limited. 1996-1998


Installing other components for the SGML Import add-on (S2V8.CAO)

After installing the S2V8 Corel add-on you should copy the following files from the Corel VENTURA installation CD-ROM to your system. (In the following "D" indicates your CD-ROM drive letter and "C" indicates the drive where you installed Corel VENTURA).

D:\SGML\PROGRAMS to C:\COREL\GRAPHICS8\PROGRAMS

D2LVEN8.DLL - program for the D2LVEN8.EXE file

D2LVEN8.EXE - Utility for creating a logic file (.LGC) from a Document Type Definition (DTD)

D2LVEN8.HLP - Help file for D2LVEN8.EXE

SG2VEN8.DLL - SGML to Ventura conversion filter

VLRED8.CNT - Help contents file for VLRED8.EXE

VLRED8.DLL - program for the VLRED8.EXE file

VLRED8.EXE - Editor for creating and modifying Ventura Layout Rules (.VLR) files

VLRED8.HLP - Help file for VLRED8.EXE

VLRED8.TLB

WMEN.DLL

D:\SGML\SGML to C:\COREL\GRAPHICS8\SGML

AAP_TBL.DTD

CALS_TBL.DTD

DEFAULT.DEC - Default SGML declaration file

HTML_TBL.DTD

SGML.REG

SGMLDEMO.DTD - Sample SGML Document Type Definition (DTD)

SGMLDEMO.LGC - Sample SGML logic file

SGMLDEMO.SGM - This Release Notes file (SGML)

SGMLDEMO.VLR - Sample SGML Ventura Layout Rules (.VLR) file

SGMLDEMO.VP - Sample Ventura template publication

WP60MIN.DTD

WP60TBL.DTD

WPTABLE.DTD

D:\SGML\SGML\MAPFILES to C:\COREL\GRAPHICS8\SGML\MAPFILES

ISO_ENT.MAP

ISOAMSA.ENT

ISOAMSB.ENT

ISOAMSC.ENT

ISOAMSN.ENT

ISOAMSO.ENT

ISOAMSR.ENT

ISOBOX.ENT

ISOCYR1.ENT

ISOCYR2.ENT

ISODIA.ENT

ISOGRK1.ENT

ISOGRK2.ENT

ISOGRK3.ENT

ISOGRK4.ENT

ISOLAT1.ENT

ISOLAT2.ENT

ISONUM.ENT

ISOPUB.ENT

ISOTECH.ENT

Related Concepts


Adding SGML Import components to Corel VENTURA user interface

Update the Registry

1	Run the Registry Editor (regedit.exe).

2	Locate the following key: HKEY_LOCAL_MACHINE\SOFTWARE\Corel\Corel Ventura\8.0

3	Create a new string value with the following name: SGMLDir

4	Modify the new string's value to: "C:\Corel\Graphics8\Ventura\SGML" where C is the letter of the drive on which Corel VENTURA 8 is installed.

Add SGML Items to the menu

1	Start Corel VENTURA 8, and then either open a publication or Click File > New > OK.

2	Click Tools > Customize.

3	Select the Menu tab.

4	Add the Import SGML feature:

5	Scroll to the bottom of the Commands list box, and expand the Add-ons folder.

6	Select (S2V8) - SGMLImport.

7	In the Menu drop-down list, make sure Main Menu is selected. Then expand the T&ools folder in the list box.

8	Scroll to the bottom of the list, and select &Add-ons.

9	Click the Add button located between the two list boxes.

10	Right-click the item you just added to the Menu list box, click Rename, and rename it to: &Import SGML.

Add the Layout Rules Editor feature to the menu

1	Expand the Ventura Scripts folder in the Commands list box.

2	Select Vlred8.

3	Expand the T&ools folder in the Menu list box (if you have not already done so).

4	Select the last item under T&ools (just above &Window).

5	Click the Add button located between the two list boxes.

6	Right-click the item you just added to the Menu list box, click Rename, and rename it to: &Layout Rules Editor

7	Click OK to close the Customize dialog box and save your changes.

Related Concepts


Using sample files
Using the sample files

Create an SGML Component

1	With Corel VENTURA 8 running, click Tools > Import SGML.

2	Click Add.

3	Click the SGML Document Type text box, and type: SGMLDEMO

4	Click Ventura Publication in the Files list box, click Browse, and then find and select \Corel\Graohics8\Ventura\SGML\SGMLDEMO.VP.

5	Click LGC File in the Files list box, click Browse, and then find and select \Corel\Graphics8\Ventura\SGML\SGMLDEMO.LGC.

6	Click VLR File in the Files list box, click Browse, and then find and select: \Corel\Graphics8\Ventura8\SGML\SGMLDEMO.VLR

7	Click OK to close the Add SGML Document Type dialog box and save your changes.

Import the Sample SGML File

1	With Corel VENTURA 8 running, click Tools > Import SGML (if you have not already done so).

2	Click the SGML File text box, click Browse, and then find and select \Corel\Graphics8\Ventura\SGML\SGMLDEMO.SGM

3	Click Import > Yes to import the file into Corel VENTURA 8 using the tags defined in the SGMLDEMO.VP publication.

Note

If you want to save the file, click File > Save As, and then specify a new filename. That way you can still use the original SGMLDEMO.VP as a template publication.

Related Concepts


Using your own files

The Import SGML feature of Corel VENTURA 8 automatically generates page layout information for your SGML files, based on the SGML elements (objects) in the file. This process must know how the SGML elements relate to the available Ventura tags. The Ventura Layout Rules Editor allows you to associate Ventura tags with SGML elements and store these relationships in a Ventura Layout Rules (.VLR) file.

To create a Ventura Layout Rules file, you need a template Ventura publication (.VP) file, as well as a "Logic" (.LGC) file. The Ventura publication contains the paragraph tags and character tags used to format the document. The Logic file is a binary representation of the SGML Document Type Definition (DTD) used to create the SGML document you want to import.

So, the first thing you need to do is precompile your DTD.

Precompile Your DTD

1	The DTD to LGC Utility compiles a DTD file to a Logic (.LGC) file. As part of the conversion process, it checks the DTD for syntax errors. DTD to LGC will not create a Logic file if it finds any errors in the DTD.

2	For further information, see the online help in the DTD to LGC Utility.

Create a Template Publication

Make sure the Ventura publication (.VP) contains all of the paragraph tags and character tags you will need to format the imported SGML document.

Create Ventura Layout Rules

Run the Layout Rules Editor. If the installation was completed successfully, you can run it from within Corel VENTURA 8 by choosing Tools > Layout Rules Editor. (You may also want to make a shortcut to the file vlred8.exe in the \Corel\Graphics8\Ventura\Programs folder.)

Create rules to associate Corel VENTURA tags with SGML elements.

For further information, see the online help in the Layout Rules Editor, under Help > Help Topics > How Do I.

Create an SGML Component

Follow the steps outlined in the "Create an SGML Component" using the names of your own files in place of the sample files.

Import Your SGML File(s)

Follow the steps outlined in the Import the Sample SGML File section using the names of your own files in place of the sample files.

Related Concepts


Note for Corel WordPerfect users

Logic files (.LGC) created for use with Corel WordPerfect are not compatible with logic files created for Corel VENTURA because of differences in the way non-keyboard characters are handled. You will need to re-create your logic files using the DTD to LGC utility included with Corel VENTURA.

Related Concepts


About Import SGML

Use this dialog box to import SGML documents into Corel VENTURA.

SGML File

Specify the name of the SGML file you want to import.

SGML Document Type

Select the document type for the SGML document you are importing.  For SGML import in Corel VENTURA, a "document type" includes the following components:

♦	LGC File

♦	VLR File

♦	Template Publication

Insert at Cursor

Select this option to insert the SGML document at the cursor location in Corel VENTURA.  The file is also added to the file list.

Only Add to List

Select this option to add the document to the file list in Corel VENTURA without inserting the document.

Tip

♦	Click Wizard and follow the prompts for step-by-step assistance with adding an SGML document type.

For more information about installing SGML Import and using samples see:

Installing other components for the SGML Import add-on (S2V8.CAO)

Adding SGML Import components to Corel VENTURA user interface

Using the sample files

Using your own files

Note for Corel WordPerfect users

For more information about using SGML Import see:

To add an SGML Document Type

To import an SGML document

To edit an SGML Document Type

To delete an SGML Document Type

To run VLR Editor from within Corel VENTURA

Related Concepts


Add or Edit SGML Document Type

Use this dialog box to add or edit an SGML Document Type.

SGML Document Type Name

Specify the name of the document type.

Files

Specify the files to be used to import this document type.

Ventura Publication

Optional.  Specify the name of the template publication or another Corel VENTURA publication that contains the tags for this document type.  If a tag specified in the .VLR file cannot be found, Corel VENTURA will create a tag with that name, based on the Body Text tag.

LGC File

Required.  Specify the name of the .LGC file for this document type.

VLR File

Required.  Specify the name of the .VLR file for this document type.

To specify a file

To delete a file specification


SGML

Standard Generalized Markup Language.  SGML is officially defined in International Standard 8879, published by the International Organization for Standardization.


LGC File

A logic file (.LGC) is a binary version of an SGML DTD file.  Use the DTD to LGC utility (D2LVEN7.EXE) to create a logic file.


VLR File

A Ventura Layout Rules file (.VLR), or layout file, is a file that specifies which Corel VENTURA tags and/or markup codes to use when importing SGML elements.  Each element listed in the .VLR file will be formatted using the tag or markup codes specified for that element.  Use the VLR Editor to create a .VLR file.


Template Publication

A "template" publication is a Corel VENTURA publication that contains all of the tags required to format a particular SGML document type.


To add an SGML Document Type
To add an SGML Document Type,

1	Click VENTURA8 [image] Import SGML [image] Add.

2	Specify a document type name and the files to be used to import the document type.

About Import SGML


To edit an SGML Document Type
To edit an SGML Document Type,

1	Click VENTURA8 [image] Import SGML, select a document type, then click Edit.

2	Edit the document type name, or modify the names of the files used to import the document type.

About Import SGML


To delete an SGML Document Type
To delete an SGML Document Type,

1	Click VENTURA8 [image] Import SGML, select the document type you want to delete, then click Delete [image] Yes.

About Import SGML


To import an SGML document
To import an SGML document,

1	In Corel VENTURA, open the template publication or another publication that contains the tags and markup codes for the type of document you want to import.

2	Click VENTURA8 [image] Import SGML, select the SGML file you want to import, select the corresponding SGML document type, then click Import.

About Import SGML


DTD

Document Type Definition


To run VLR Editor from within Corel VENTURA
To run VLR Editor from within Corel VENTURA,

1	Click VENTURA8 [image] VLR Editor.

About Import SGML


To specify a file
To specify a file,

1	Click VENTURA8 [image] Import SGML, then either click Add or select a document type and click Edit.

2	Select the file type in the Description column.

3	Click Browse.

4	Specify the filename, then click Select.

Add or Edit SGML Document Type


To delete a file specification
To delete a file specification,

1	Click VENTURA8 [image] Import SGML, select the document type you want to modify, then click Edit.

2	In the Description column, select the file type for which you want to delete the file specification.

3	Click Clear.

Add or Edit SGML Document Type


Details about Import SGML

The Import SGML feature in Corel VENTURA imports the text of SGML documents, replacing the SGML tags with the Corel VENTURA tags, features, or markup codes specified in the .VLR file..

Corel VENTURA Features

Import SGML supports the following in Corel VENTURA:

♦	Tag Types

♦	Paragraph tags

♦	Character tags

♦	Features

♦	Footnotes

♦	Endnotes

♦	Hidden text

♦	Markup Codes

♦	Line break

♦	Any markup code can be inserted as text in place of the SGML start tag or end tag

For SGML elements that have no rule or element type specified in the .VLR file, the contents of the element will be formatted using the last active tag, or using Body Text if no other tag is active.

Tables

Import SGML supports the following types of tables:

♦	CALS (Computer-aided Acquisition and Logistics Support, U.S. Department of Defense)

♦	AAP (Association of American Publishers)

♦	HTML (HyperText Markup Language)

♦	Corel WordPerfect

If one of these table types is included in the SGML DTD that was used to create the .LGC file, tables will be converted automatically to Corel VENTURA tables when you import the SGML document.  (Sample DTD fragments for these table types are included in the SGML folder in the folder where you installed Corel VENTURA.)

SGML Features

Import SGML handles the following SGML features as indicated below:

♦	BASESET Characters -- Changes to the SGML BASESET are ignored.  Any characters greater than 127 in the ASCII character set are imported as Corel VENTURA non-keyboard characters in the current font.

♦	Internal Entity References -- Internal entity references are expanded, and any markup they contain is recognized.

♦	External Entity References -- External entity references are not expanded; the references are imported as text (for example, &filename;).

♦	Minimization Features -- OMITTAG and SHORTTAG are supported.

♦	Marked Sections -- Marked sections are imported as text, including the markup.

♦	Short References -- Short references (SHORTREF) are not supported; the references are imported as text.

♦	CURRENT and DEFAULT Attributes -- For layout rules that include attributes, the rule is applied according to the current value of the attribute.  Remember that this is an inherited value for attributes of type CURRENT or DEFAULT.  When Import SGML checks an attribute value to see if it matches the value specified in a layout rule, the check is made as a direct string comparison (case sensitive only for CDATA attributes).

Tips

♦	When you create a .VLR file, use character tags only for character-oriented elements and paragraph tags only for paragraph-oriented elements.

♦	If both a Corel VENTURA tag and element layout (including markup codes) are specified in a layout rule, the contents of the element will be enclosed in the element layout, and then the contents and layout will be imported into the tag.

Related Concepts


What happens with nested elements?

The following information applies to nested SGML elements during the import.

Paragraph Tags

If an SGML element associated with a Corel VENTURA paragraph tag is nested within another paragraph, the containing paragraph is closed, and the nested element is formatted as a new paragraph (using the associated paragraph tag), beginning at the start tag for the nested element.

If an element associated with a paragraph tag is nested within a character tag, footnote, endnote, or hidden text, the paragraph tag is not applied, but the contents of the element are imported into the footnote, endnote, or hidden text.

Character Tags

If an SGML element associated with a Corel VENTURA character tag is nested within hidden text, the character tag is not applied, but the contents of the element are imported into the hidden text.

If an element associated with a character tag is nested within another character tag, the nested text will retain its markup (you can see it in Copy Editor), but it will be displayed using the tag in which it is nested.

Footnotes/Endnotes

If an SGML element associated with a Corel VENTURA footnote or endnote is nested within another footnote or endnote, or within hidden text, the contents of the element are imported as regular text into the current footnote, endnote, or hidden text.

Hidden Text

If an SGML element associated with Corel VENTURA hidden text is nested within other hidden text, the contents of the element are imported into the current hidden text.

Related Concepts