YAWC Pro : One Click Publishing from Word YAWC Pro : One Click Publishing from Word
 

!

Description

Documentation

FAQ

DTDs

Clients

 

YAWC Application Programming Interface

This document specifies the API for developing your own customised application using YAWC Pro. You can use VBA, VBScript, or any other ActiveX-enabled scripting language such as PerlScript. Alternatives to VBA may be useful for customising applications such as SoftQuad XMetaL.

YAWCCOM.yawcOptions

Properties

interactiveMode

Default: false

Determines whether YAWC will prompt the user if there is an error, or if input is needed (eg, prompting for the ini file). If this property is set to false, there will be no interaction and any error messages will be returned form the Convert method (and stored in yawcError.messages).

yawcRemovePass1File

Default: false

Removes the pass1 file (usually the xml file) after a conversion. This is useful if you just want the html and not the xml.

displayProgressWindow

Default: true

Shows the progress window during a conversion. You may want to turn this off if you're using single conversions with interactiveMode on or if you're running batch conversions with interactiveMode off.

updateStatusBar

Default: false

Shows the same messages as in the progress window, one at a time in Word's status bar

applicationBrandname

Default: YAWC

The string to appear on dialog boxes, etc.

writeLog

Default: true

Writes log file yawc.log

yawcDebug

Default: false

Turns on debugging information

BulletedListElementName

Default: e1

BulletListLevel1StyleName

Default: <none>

BulletListLevel2StyleName

Default: <none>

BulletListLevel3StyleName

Default: <none>

DefaultElementName

Default: div

footnoteElement

Default: Footnote

footnoteReferenceElement

Default: FnRef

hyperlinkElementName

Default: URL href="{link}"

inputStylesheet

Default: <none>

Level1ElementName

Default: Section

Level1StyleName

Default: <none>

Level2ElementName

Default: Subsection

Level2StyleName

Default: <none>

Level3ElementName

Default: Subsectiontwo

Level3StyleName

Default: <none>

Level4ElementName

Default: Subsectionthree

Level4StyleName

Default: <none>

NumberedListElementName

Default: List type="ordered"

NumberedListLevel1StyleName

Default: <none>

NumberedListLevel2StyleName

Default: <none>

NumberedListLevel3StyleName

Default: <none>

pass1Extension

Default: .xml

pass1Stylesheet

Default: <none>

pass2Extension

Default: .htm

pass2Stylesheet

Default: <none>

pass2Template

Default: <none>

additionalStylesheets

Default: <none>

Specifies what stylesheets are applied after pass2

yawcBoldElement

Default: e2

yawcBookmarkElementName

Default: <none>

yawcItalicElement

Default: e1

yawcPass2HTMLContentTypeStrip

Default: false

yawcRemovePass1File

Default: false

yawcSubscriptElement

Default: e5

yawcSuperscriptElement

Default: e4

yawcUnderlineElement

Default: e3

yawcVerifySequence

Default: %

TidyOptions

Default: n/a

Gives access to TidyCOM object used for importing HTML.

(Not implemented)

yawcRemovePass2File

Default: false

Removes the pass2 file (normally the html file) after conversion.

(Not implemented)

deleteTempFile

Default: true

Removes the temp file (the file before the pass1 stylesheet was applied). This is usual for debugging XSLT stylesheets.

(Not implemented)

Methods

resetToDefaults

Parameters: none

Returns: nothing

Resets the values of all properties to their defaults.

YAWCCOM.yawcObject

Properties

yawcError

Default: n/a

Provides access to the instance of yawcError that is used by the current yawcObject.

yawcOptions

Default: n/a

Provides access to the instance of yawcOptions that is used by the current yawcObject.

Methods

Convert

Parameters: none

Returns: string containing any error messages

Converts the active document to XML and/or HTML.

ConvertFile

Parameters: string containing filename

Returns: string containing any error messages

Opens, converts and closes the specified document.

EditDocInfo

Parameters: none

Returns: nothing

Edits this document's information. This relates directly to HTML meta tags.

ImportHTML

Parameters: none

Returns: nothing

Imports a HTML file, first applying an XSLT stylesheet.

Init

Parameters: none

Returns: nothing

Reads in the INI file. The Convert and Verify methods automatically read in the INI file, but cache the contents. This method forces a reread of the file.

The INI file is looked for first in the yawcConfigFile custom property of the document, then in the same directory as the document and then in the template directory. After this the user is prompted for the filename (in interactive mode).

InitWithFile

Parameters: string containing filename

Returns: nothing

Reads in a specified INI file instead of the default.

ShowAbout

Parameters: none

Returns: nothing

Shows YAWC's about dialog.

Validate

Parameters: none

Returns: string containing any error messages

Validate the converted XML file. Checks that it is wellformed and validated against a DTD (if any).

Verify

Parameters: none

Returns: string containing any error messages

Verifies the active word document to ensure that it will be converted correctly. This method verifies against yawcVerifySequence and also checks the heading, bullet and number hierarchies.

getLogFilename

Parameters: none

Returns: string containing the path and filename of the YAWC log file

YAWCCOM.yawcError

Properties

messages

Default: n/a

Contains any errors/warnings/messages from the previous convert/verify/validate operation.

Methods

dump

Parameters: none

Returns: string containing contents of messages

Valid HTML 4.0!WAI CompliantValid CSS!