;------------------------------------------------------------------------------------------------------------------------------------------ ; ; TidyCom.wbt Version 1.01 2012-07-02 ; ; Changes in version 1.01: ; - Replaced all functions StrCat() by the colon string connector ":". ; - Changed variable names to get more systematical use of names. ; - Changed the register/unregister method from the usage of the external system tool "regsvr32.exe" ; to the usage of the "DllRegisterServer/DllUnRegisterServer" calls, provided by the COM module itself. ; - Some cosmetical changes. ; ; (c)Detlev Dalitz.20020601.20120702. ;------------------------------------------------------------------------------------------------------------------------------------------ ; History ; ; TIDYCOM.WBT Version 1.00 2002-06-01 ; ; This WinBatch script is a wrapper for André Blavier's "TidyCOM.dll". ; ; It is just my first throw on it to check out what the wonderful little tidy dll can do for me. ; TIDYCOM.WBT would be nicer to handle if there could be a dialog on screen to check the various options on the fly, ; so next update is on the line ... maybe later in this cinema ... ; ; TidyCOM is a Windows COM component wrapping Dave Raggett's HTML Tidy, ; a free utility application from the World Wide Web Consortium, that helps you clean up your web pages. ; ; Get the "TidyCOM.dll" for Windows from André Blavier's Homepage (download TidyCOM.zip) ; Go to the "HTML Tidy Library Project" at sourceforge.net ; ; For more information go to: ; - http://perso.wanadoo.fr/ablavier/TidyCOM/ ; - http://tidy.sourceforge.net/ ; - and study this document. ; ; Use on your own risk. ;------------------------------------------------------------------------------------------------------------------------------------------ DirChange (DirScript ()) strFolderStart = DirGet () intReturnCode = 1 If IsDefined (param1) Then strFileSource = param1 ; If there is no filename available from param1, then ... If !IsDefined (strFileSource) AFN_title = "TidyCom - choose a filename -" AFN_directory = "." ; Choose your own startfolder here. AFN_filetypes = "HTML Files|*.htm;*.html|XML Files|*.xml;*.xls|Text Files|*.txt|All Files|*.*" AFN_filename = "*.htm*" AFN_flag = 1 strFileSource = AskFilename (AFN_title, AFN_directory, AFN_filetypes, AFN_filename, AFN_flag) EndIf DropWild ("AFN*") strFileSourceRoot = FileRoot (strFileSource) strFolderSource = FilePath (strFileSource) strFileTarget = strFolderSource : strFileSourceRoot : ".Tidy.htm" strFileError = strFolderSource : strFileSourceRoot : ".Tidy.Error.txt" DirChange (strFolderSource) strFileTidyConfig = "Tidy.Config.txt" strFileBrowserExe = "iexplore.exe" strFileTxtEditExe = "notepad.exe" strFileHtmEditExe = "WinBatch Studio.exe" ; "HTMLKit.exe" or anything else. strFileTidyComDll = Environment ("ProgramFiles") : "\TIDY\TidyCOM.dll" ; Location of TidyCOM.dll. ; Current version (1.2.6, 27 June 2001) is based on the 4th August 2000 version of HTML Tidy. intResult = DllCall (strFileTidyComDll, long : "DllRegisterServer") ; strFileRegSvrExe = FileLocate ("regsvr32.exe") ; Run (strFileRegSvrExe, "/s " : strFileTidyComDll) ; Silent install and register TidyCOM.dll. ;.......................................................................................................................................... objTidy = ObjectOpen ("TidyCOM.TidyObject.1") objTidyOpt = objTidy.Options ;---- Operation Options ----------------------; objTidyOpt.Reset ; Reset options to default settings. objTidyOpt.ErrorFile = strFileError ; intOptClean = objTidyOpt.Clean ; intOptWord2000 = objTidyOpt.Word2000 ; intOptTidyMark = objTidyOpt.TidyMark ; intOptDocType = objTidyOpt.DocType ; objTidyOpt.Load(strFileTidyConfig) ; Load option settings from config file. ; intOptClean = objTidyOpt.Clean ; intOptWord2000 = objTidyOpt.Word2000 ; intOptTidyMark = objTidyOpt.TidyMark ; strOptDocType = objTidyOpt.DocType objTidyOpt.Markup = @TRUE ; boolean default=@TRUE ;objTidyOpt.Markup = @FALSE ; boolean ;objTidyOpt.Quiet = @TRUE ; boolean objTidyOpt.Quiet = @FALSE ; boolean default=@FALSE objTidyOpt.ShowWarnings = @TRUE ; boolean default=@TRUE ;objTidyOpt.ShowWarnings = @FALSE ; boolean objTidyOpt.KeepTime = @TRUE ; boolean default=@TRUE ;objTidyOpt.KeepTime = @FALSE ; boolean ;objTidyOpt.Split = @TRUE ; boolean objTidyOpt.Split = @FALSE ; boolean default=@FALSE ;objTidyOpt.GnuEmacs = @TRUE ; boolean objTidyOpt.GnuEmacs = @FALSE ; boolean default=@FALSE ;---- Markup Options -------------------------; objTidyOpt.Doctype = "auto" ; string default=auto ;objTidyOpt.Doctype = "omit" ; string ;objTidyOpt.Doctype = "strict" ; string ;objTidyOpt.Doctype = "loose" ; string ;objTidyOpt.Doctype = "transitional" ; string ;objTidyOpt.Doctype = "formal public identifier (FPI)" ; user specified string ; For example: "-//ACME//DTD HTML 3.14159//EN" ; does this work ??? ;objTidyOpt.TidyMark = @TRUE ; boolean default=@TRUE objTidyOpt.TidyMark = @FALSE ; boolean ;objTidyOpt.HideEndtags = @TRUE ; boolean objTidyOpt.HideEndtags = @FALSE ; boolean default=@FALSE ;objTidyOpt.EncloseText = @TRUE ; boolean objTidyOpt.EncloseText = @FALSE ; boolean default=@FALSE ;objTidyOpt.EncloseBlockText = @TRUE ; boolean objTidyOpt.EncloseBlockText = @FALSE ; boolean default=@FALSE objTidyOpt.NewEmptyTags = "" ; string of tagnames ; default="" objTidyOpt.NewInlineTags = "" ; string of tagnames ; default="" objTidyOpt.NewBlocklevelTags = "" ; string of tagnames ; default="" objTidyOpt.NewPreTags = "" ; string of tagnames ; default="" ;---- Cleanup Options ------------------------; ;objTidyOpt.Clean = @TRUE ; boolean objTidyOpt.Clean = @FALSE ; boolean default=@FALSE ;objTidyOpt.DropFontTags = @TRUE ; boolean objTidyOpt.DropFontTags = @FALSE ; boolean default=@FALSE ;objTidyOpt.LogicalEmphasis = @TRUE ; boolean objTidyOpt.LogicalEmphasis = @FALSE ; boolean default=@FALSE objTidyOpt.DropEmptyParas = @TRUE ; boolean default=@TRUE ;objTidyOpt.DropEmptyParas = @FALSE ; boolean ;objTidyOpt.Word2000 = @TRUE ; boolean objTidyOpt.Word2000 = @FALSE ; boolean default=@FALSE objTidyOpt.FixBackslash = @TRUE ; boolean default=@TRUE ;objTidyOpt.FixBackslash = @FALSE ; boolean objTidyOpt.FixBadComments = @TRUE ; boolean default=@TRUE ;objTidyOpt.FixBadComments = @FALSE ; boolean objTidyOpt.AltText = "" ; string -none-=default ;---- XML Options ----------------------------; ; objTidyOpt.InputXml = @TRUE ; boolean objTidyOpt.InputXml = @FALSE ; boolean default=@FALSE ;objTidyOpt.OutputXml = @TRUE ; boolean objTidyOpt.OutputXml = @FALSE ; boolean default=@FALSE ;objTidyOpt.OutputXhtml = @TRUE ; boolean objTidyOpt.OutputXhtml = @FALSE ; boolean default=@FALSE ;objTidyOpt.AddXmlDecl = @TRUE ; boolean objTidyOpt.AddXmlDecl = @FALSE ; boolean default=@FALSE ;objTidyOpt.AssumeXmlProcins = @TRUE ; boolean objTidyOpt.AssumeXmlProcins = @FALSE ; boolean default=@FALSE ;objTidyOpt.AddXmlSpace = @TRUE ; boolean objTidyOpt.AddXmlSpace = @FALSE ; boolean default=@FALSE ;---- Encoding Options -----------------------; ;objTidyOpt.CharEncoding = 0 ; CharEncoding raw=0 ;objTidyOpt.CharEncoding = 1 ; CharEncoding ascii=1 ;objTidyOpt.CharEncoding = 2 ; CharEncoding latin1=2 objTidyOpt.CharEncoding = 3 ; CharEncoding utf8=3 ;objTidyOpt.CharEncoding = 4 ; CharEncoding so2022=4 ;objTidyOpt.CharEncoding = 5 ; CharEncoding mac=5 ;objTidyOpt.CharEncoding = 6 ; CharEncoding win1252=6 ;objTidyOpt.NumericEntities = @TRUE ; boolean objTidyOpt.NumericEntities = @FALSE ; boolean default=@FALSE ;objTidyOpt.QuoteMarks = @TRUE ; boolean objTidyOpt.QuoteMarks = @FALSE ; boolean default=@FALSE objTidyOpt.QuoteNbsp = @TRUE ; boolean default=@TRUE ;objTidyOpt.QuoteNbsp = @FALSE ; boolean objTidyOpt.QuoteAmpersand = @TRUE ; boolean default=@TRUE ;objTidyOpt.QuoteAmpersand = @FALSE ; boolean ;---- Layout Options -------------------------; objTidyOpt.Indent = 0 ; IndentScheme NoIndent=0 ;objTidyOpt.Indent = 1 ; IndentScheme IndentBlocks=1 ;objTidyOpt.Indent = 2 ; IndentScheme AutoIndent=2 objTidyOpt.IndentSpaces = 2 ; integer objTidyOpt.Wrap = 0 ; integer default=68 NoWrap=0 objTidyOpt.TabSize = 3 ; integer ;objTidyOpt.IndentAttributes = @TRUE ; boolean objTidyOpt.IndentAttributes = @FALSE ; boolean default=@FALSE ;objTidyOpt.WrapAttributes = @TRUE ; boolean objTidyOpt.WrapAttributes = @FALSE ; boolean default=@FALSE ;objTidyOpt.WrapScriptLiterals = @TRUE ; boolean objTidyOpt.WrapScriptLiterals = @FALSE ; boolean default=@FALSE objTidyOpt.WrapAsp = @TRUE ; boolean default=@TRUE ;objTidyOpt.WrapAsp = @FALSE ; boolean objTidyOpt.WrapJste = @TRUE ; boolean default=@TRUE ;objTidyOpt.WrapJste = @FALSE ; boolean objTidyOpt.WrapPhp = @TRUE ; boolean default=@TRUE ;objTidyOpt.WrapPhp = @FALSE ; boolean ;objTidyOpt.BreakBeforeBr = @TRUE ; boolean objTidyOpt.BreakBeforeBr = @FALSE ; boolean default=@FALSE ;objTidyOpt.UppercaseTags = @TRUE ; boolean objTidyOpt.UppercaseTags = @FALSE ; boolean default=@FALSE ;objTidyOpt.UppercaseAttributes = @TRUE ; boolean objTidyOpt.UppercaseAttributes = @FALSE ; boolean default=@FALSE ;objTidyOpt.LiteralAttributes = @TRUE ; boolean objTidyOpt.LiteralAttributes = @FALSE ; boolean default=@FALSE ;.......................................................................................................................................... ; Testcase 1. ; File to File converting. objTidy.TidyToFile(strFileSource, strFileTarget) ; File to File converting. ; Testcase 2. ; File to Mem converting. ; strTemp = objTidy.TidyToMem(strFileSource); File to Mem converting. ; hdlFW = FileOpen (strFileTarget, "WRITE") ; FileWrite (hdlFW, strTemp) ; FileClose (hdlFW) ; Drop (hdlFW, strTemp) ; Testcase 3. ; Mem to Mem converting. ; intBBSize = FileSize (strFileSource) ; hdlBB = BinaryAlloc (intBBSize) ; BinaryRead (hdlBB, strFileSource) ; strTemp = BinaryPeekStr (hdlBB, 0, intBBSize) ; BinaryFree (hdlBB) ; strTemp = objTidy.TidyMemToMem(strTemp) ; Mem to Mem converting. ; intBBSize = StrLen (strTemp) ; hdlBB = BinaryAlloc (intBBSize) ; BinaryPokeStr (hdlBB, 0, strTemp) ; BinaryWrite (hdlBB, strFileTarget) ; BinaryFree (hdlBB) ; Drop (hdlBB, strTemp, intBBSize) ;.......................................................................................................................................... intTotalWarnings = objTidy.TotalWarnings intTotalErrors = objTidy.TotalErrors strListStatus = "" strListStatus = ItemInsert ("TotalErrors" : @TAB : intTotalErrors, -1, strListStatus, @CR) strListStatus = ItemInsert ("TotalWarnings" : @TAB : intTotalWarnings, -1, strListStatus, @CR) AskItemlist ("TIDY Status", strListStatus, @CR, @UNSORTED, @SINGLE) If intTotalErrors intTotalErrors = intTotalErrors - 1 ; Zero based. strListTotalErrors = "" For intI = 0 To intTotalErrors strListTotalErrors = ItemInsert (TidyObj.Error(intI), -1, strListTotalErrors, @TAB) Next IntControl (63, 100, 100, 900, 900) AskItemlist ("TIDY Errors", StrReplace (strListTotalErrors, @CRLF, @TAB), @TAB, @UNSORTED, @SINGLE) EndIf If intTotalWarnings intTotalWarnings = intTotalWarnings - 1 ; Zero based. strListTotalWarnings = "" For intI = 0 To intTotalWarnings strListTotalWarnings = ItemInsert (objTidy.Warning(intI), -1, strListTotalWarnings, @TAB) Next IntControl (63, 100, 100, 900, 900) AskItemlist ("TIDY Warnings", StrReplace (strListTotalWarnings, @CRLF, @TAB), @TAB, @UNSORTED, @SINGLE) EndIf IntControl (63, 100, 100, 900, 900) AskItemlist ("TIDY Comments", StrReplace (objTidy.Comments, @CRLF, @TAB), @TAB, @UNSORTED, @SINGLE) If FileExist (strFileTarget) Run (strFileBrowserExe, strFileTarget) TimeDelay (2) Run (strFileHtmEditExe, strFileTarget) EndIf If FileExist (strFileError) RunWait (strFileTxtEditExe, strFileError) FileDelete (strFileError) EndIf intReturnCode = 0 :CANCEL If IsDefined (objTidy) DropWild ("objTidy*") intResult = DllCall (strFileTidyComDll, long : "DllUnregisterServer") ; Run (strFileRegSvrExe, "/u /s " : strFileTidyComDll) ; Silent uninstall TidyCOM.dll. EndIf DirChange (strFolderStart) If IntControl (77, 80, 0, 0, 0) > 0 Then Return intReturnCode Exit ;------------------------------------------------------------------------------------------------------------------------------------------ ;------------------------------------------------------------------------------------------------------------------------------------------ ; Example tidy configuration file for use with the objTidyOpt.Load function. ; Note: Only few options from the Tidy.exe file are implemented into TidyCom.dll. ;------------------------------------------------------------------------------------------------------------------------------------------ ; clean: yes ; bare: yes ; input-encoding: utf8 ; output-encoding: utf8 ; word-2000: yes ; tidy-mark: no ; DocType: strict ; output-html: yes ; show-body-only: yes ;------------------------------------------------------------------------------------------------------------------------------------------ ;------------------------------------------------------------------------------------------------------------------------------------------ ; Usage: regsvr32 [/u] [/s] [/n] [/i[:cmdline]] dllname ; /u - Unregister server ; /s - Silent; display no message boxes ; /c - Console output ; /i - Call DllInstall passing it an optional [cmdline]; when used with /u calls dll uninstall ; /n - do not call DllRegisterServer; this option must be used with /i~`) ;------------------------------------------------------------------------------------------------------------------------------------------ ;------------------------------------------------------------------------------------------------------------------------------------------ ; TidyCOM ; A COM Wrapper for HTML Tidy ; Author: André Blavier ; Current version (1.2.6, 27 June 2001) is based on the 4th August 2000 version of HTML Tidy. ;.......................................................................................................................................... ;; Operation Options ;Markup ; boolean ;Quiet ; boolean ;ShowWarnings ; boolean ;Split ; boolean ;KeepTime ; boolean ;ErrorFile ; string ;GnuEmacs ; boolean ;.......................................................................................................................................... ;; Markup Options ;Doctype ; string ;TidyMark ; boolean ;HideEndtags ; boolean ;EncloseText ; boolean ;EncloseBlockText ; boolean ;NewEmptyTags ; string ;NewInlineTags ; string ;NewBlocklevelTags ; string ;NewPreTags ; string ;.......................................................................................................................................... ;; Cleanup Options ;Clean ; boolean ;DropFontTags ; boolean ;LogicalEmphasis ; boolean ;DropEmptyParas ; boolean ;Word2000 ; boolean ;FixBadComments ; boolean ;FixBackslash ; boolean ;AltText ; string ;.......................................................................................................................................... ;; XML Options ;InputXml ; boolean ;OutputXml ; boolean ;OutputXhtml ; boolean ;AddXmlDecl ; boolean ;AssumeXmlProcins ; boolean ;AddXmlSpace ; boolean ;.......................................................................................................................................... ;; Encoding Options ;CharEncoding ; CharEncoding ;; CharEncoding: an enumerated type with the following possible values: ;; raw (0) ;; ascii (1) ;; latin1 (2) ;; utf8 (3) ;; iso2022 (4) ;; macroman (5) ;NumericEntities ; boolean ;QuoteMarks ; boolean ;QuoteNbsp ; boolean ;QuoteAmpersand ; boolean ;.......................................................................................................................................... ;; Layout Options ;Indent ; IndentScheme ;; IndentScheme: an enumerated type with the following possible values: ;; NoIndent (0) ;; IndentBlocks (1) ;; AutoIndent (2) ;IndentSpaces ; integer ;Wrap ; integer ;TabSize ; integer ;IndentAttributes ; boolean ;WrapAttributes ; boolean ;WrapScriptLiterals ; boolean ;WrapAsp ; boolean ;WrapJste ; boolean ;WrapPhp ; boolean ;BreakBeforeBr ; boolean ;UppercaseTags ; boolean ;UppercaseAttributes ; boolean ;LiteralAttributes ; boolean ;------------------------------------------------------------------------------------------------------------------------------------------ ;------------------------------------------------------------------------------------------------------------------------------------------ ; Warning ; TidyCOM's code is not re-entrant--no more than 1 instance of TidyObject should be alive at the same time in the same process. ; ; The ITidyObject Interface ; TidyToMem(sourceFile) - invokes Tidy on sourceFile. Returns tidied file content as a string. ; TidyToFile(sourceFile, destFile) - invokes Tidy on sourceFile and writes tidied content in destFile ; (sourceFile can be the same file name as destFile). ; TidyMemToMem(sourceString) - invokes Tidy with sourceString. Returns tidied string content as a string. (Actually uses a temporary file.) ; Options (read-only property) - yields access to the TidyOptions class. ; TotalWarnings (read-only integer property) - number of warning messages from Tidy. ; Warning(i) (read-only string property) - ith warning message from Tidy (0-based). ; TotalErrors (read-only integer property) - number of error messages from Tidy. ; Error(i) (read-only string property) - ith error message from Tidy (0-based). ; Comments (read-only string property) - comments generated by Tidy. ; ; The ITidyOptions Interface ; Load(configFile) - load option settings from configFile ; Reset() - reset options to default settings ; Furthermore, there is a read-write property for each option that can be used in configuration files ; (only write-back is missing - you can achieve its effect with TidyToFile(sourceFile, sourceFile)). ; See the complete list of option properties. ;------------------------------------------------------------------------------------------------------------------------------------------ ;------------------------------------------------------------------------------------------------------------------------------------------ ; Option properties ;------------------------------------------------------------------------------------------------------------------------------------------ ; add-xml-decl ; Type: Boolean ; Default: no ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should add the XML declaration when outputting XML or XHTML. ; Note that if the input already includes an <?xml ... ?> declaration then this option will be ignored. ;.......................................................................................................................................... ; add-xml-pi ; Type: Boolean ; Default: no ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option is the same as the add-xml-decl option. ;.......................................................................................................................................... ; add-xml-space ; Type: Boolean ; Default: no ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should add xml:space="preserve" to elements such as PRE, STYLE and SCRIPT when generating XML. ; This is needed if the whitespace in such elements is to be parsed appropriately without having access to the DTD. ;.......................................................................................................................................... ; alt-text ; Type: String ; Default: -none- ; This option specifies the default "alt=" text Tidy uses for IMG attributes. ; This feature is dangerous as it suppresses further accessibility warnings. ; You are responsible for making your documents accessible to people who can not see the images! ;.......................................................................................................................................... ; break-before-br ; Type: Boolean ; Default: no ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should output a line break before each <BR> element. ;.......................................................................................................................................... ; char-encoding ; Type: Encoding ; Default: ascii ; Example: ascii, latin1, raw, utf8, iso2022, mac, win1252 input-encoding ; output-encoding ; This option specifies the character encoding Tidy uses for both the input and output. ; For ascii, Tidy will accept Latin-1 (ISO-8859-1) character values, but will use entities for all characters ; whose value > 127. For raw, Tidy will output values above 127 without translating them into entities. ; For latin1, characters above 255 will be written as entities. ; For utf8, Tidy assumes that both input and output is encoded as UTF-8. ; You can use iso2022 for files encoded using the ISO-2022 family of encodings e.g. ISO-2022-JP. ; For mac and win1252, Tidy will accept vendor specific character values, but will use entities for all characters whose value > 127. ;.......................................................................................................................................... ; clean ; Type: Boolean ; Default: no ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should strip out surplus presentational tags and attributes replacing them ; by style rules and structural markup as appropriate. It works well on the HTML saved by Microsoft Office products. ;.......................................................................................................................................... ; doctype ; Type: DocType ; Default: auto ; Example: auto, omit, strict, loose, transitional, user specified fpi (string) ; This option specifies the DOCTYPE declaration generated by Tidy. ; If set to "omit" the output won't contain a DOCTYPE declaration. ; If set to "auto" (the default) Tidy will use an educated guess based upon the contents of the document. ; If set to "strict", Tidy will set the DOCTYPE to the strict DTD. ; If set to "loose", the DOCTYPE is set to the loose (transitional) DTD. ; Alternatively, you can supply a string for the formal public identifier (FPI). ; For example: doctype: "-//ACME//DTD HTML 3.14159//EN" ; If you specify the FPI for an XHTML document, Tidy will set the system identifier to the empty string. ; Tidy leaves the DOCTYPE for generic XML documents unchanged. ;.......................................................................................................................................... ; drop-empty-paras ; Type: Boolean ; Default: yes ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should discard empty paragraphs. ; If set to no, empty paragraphs are replaced by a pair of BR elements as HTML4 precludes empty paragraphs. ;.......................................................................................................................................... ; drop-font-tags ; Type: Boolean ; Default: no ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should discard FONT and CENTER tags rather than creating the corresponding style rules, ; but only if the clean option is also set to yes. ;.......................................................................................................................................... ; enclose-block-text ; Type: Boolean ; Default: no ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should insert a <P> element to enclose any text it finds in any element ; that allows mixed content for HTML transitional but not HTML strict. ;.......................................................................................................................................... ; enclose-text ; Type: Boolean ; Default: no ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should enclose any text it finds in the body element within a <P> element. ; This is useful when you want to take existing HTML and use it with a style sheet. ;.......................................................................................................................................... ; fix-backslash ; Type: Boolean ; Default: yes ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should replace backslash characters "\" in URLs by forward slashes "/". ;.......................................................................................................................................... ; fix-bad-comments ; Type: Boolean ; Default: yes ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should replace unexpected hyphens with "=" characters when it comes across adjacent hyphens. ; The default is yes. This option is provided for users of Cold Fusion which uses the comment syntax: <!--- ---> ;.......................................................................................................................................... ; gnu-emacs ; Type: Boolean ; Default: no ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should change the format for reporting errors and warnings ; to a format that is more easily parsed by GNU Emacs. ;.......................................................................................................................................... ; hide-endtags ; Type: Boolean ; Default: no ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should omit optional end-tags when generating the pretty printed markup. ; This option is ignored if you are outputting to XML. ;.......................................................................................................................................... ; indent ; Type: AutoBool ; Default: no ; Example: auto, y/n, yes/no, t/f, true/false, 1/0 indent-spaces ; This option specifies if Tidy should indent block-level tags. ; If set to "auto", this option causes Tidy to decide whether or not to indent the content of tags ; such as TITLE, H1-H6, LI, TD, TD, or P depending on whether or not the content includes a block-level element. ; You are advised to avoid setting indent to yes as this can expose layout bugs in some browsers. ;.......................................................................................................................................... ; indent-attributes ; Type: Boolean ; Default: no ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should begin each attribute on a new line. ;.......................................................................................................................................... ; indent-spaces ; Type: Integer ; Default: 2 ; Example: 0, 1, 2, ... indent ; This option specifies the number of spaces Tidy uses to indent content, when indentation is enabled. ;.......................................................................................................................................... ; input-xml ; Type: Boolean ; Default: no ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should use the XML parser rather than the error correcting HTML parser. ;.......................................................................................................................................... ; keep-time ; Type: Boolean ; Default: yes ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should alter the last modified time for files it writes back to. ; The default is no, which allows you to tidy files without affecting which ones will be uploaded ; to a Web server when using a tool such as 'SiteCopy'. Note that this feature may not work on some platforms. ;.......................................................................................................................................... ; literal-attributes ; Type: Boolean ; Default: no ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should ensure that whitespace characters within attribute values are passed through unchanged. ;.......................................................................................................................................... ; logical-emphasis ; Type: Boolean ; Default: no ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should replace any occurrence of I by EM and any occurrence of B by STRONG. ; In both cases, the attributes are preserved unchanged. This option can be set independently of the clean and drop-font-tags options. ;.......................................................................................................................................... ; markup ; Type: Boolean ; Default: yes ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should generate a pretty printed version of the markup. ; Note that Tidy won't generate a pretty printed version if it finds significant errors (see force-output). ;.......................................................................................................................................... ; new-blocklevel-tags ; Type: Tag names ; Default: -none- ; Example: tagX, tagY, ... ; This option specifies new block-level tags. This option takes a space or comma separated list of tag names. ; Unless you declare new tags, Tidy will refuse to generate a tidied file if the input includes previously unknown tags. ; Note you can't change the content model for elements such as TABLE, UL, OL and DL. ;.......................................................................................................................................... ; new-empty-tags ; Type: Tag names ; Default: -none- ; Example: tagX, tagY, ... new-blocklevel-tags ; new-inline-tags ; This option specifies new empty inline tags. This option takes a space or comma separated list of tag names. ; Unless you declare new tags, Tidy will refuse to generate a tidied file if the input includes previously unknown tags. ; Remember to also declare empty tags as either inline or blocklevel. ;.......................................................................................................................................... ; new-inline-tags ; Type: Tag names ; Default: -none- ; Example: tagX, tagY, ... ; This option specifies new non-empty inline tags. This option takes a space or comma separated list of tag names. ; Unless you declare new tags, Tidy will refuse to generate a tidied file if the input includes previously unknown tags. ;.......................................................................................................................................... ; new-pre-tags ; Type: Tag names ; Default: -none- ; Example: tagX, tagY, ... ; This option specifies new tags that are to be processed in exactly the same way as HTML's PRE element. ; This option takes a space or comma separated list of tag names. ; Unless you declare new tags, Tidy will refuse to generate a tidied file if the input includes previously unknown tags. ; Note you can not as yet add new CDATA elements (similar to SCRIPT). ;.......................................................................................................................................... ; numeric-entities ; Type: Boolean ; Default: no ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should output entities other than the built-in HTML entities ; (&, <, > and ") in the numeric rather than the named entity form ;.......................................................................................................................................... ; output-xhtml ; Type: Boolean ; Default: no ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should generate pretty printed output, writing it as extensible HTML. ; This option causes Tidy to set the DOCTYPE and default namespace as appropriate to XHTML. ; If a DOCTYPE or namespace is given they will checked for consistency with the content of the document. ; In the case of an inconsistency, the corrected values will appear in the output. ; For XHTML, entities can be written as named or numeric entities according to the setting of the "numeric-entities" option. ; The original case of tags and attributes will be preserved, regardless of other options. ;.......................................................................................................................................... ; output-xml ; Type: Boolean ; Default: no ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should pretty print output, writing it as well-formed XML. ; Any entities not defined in XML 1.0 will be written as numeric entities to allow them to be parsed by a XML parser. ; The original case of tags and attributes will be preserved, regardless of other options. ;.......................................................................................................................................... ; quiet ; Type: Boolean ; Default: no ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should output the summary of the numbers of errors and warnings, ; or the welcome or informational messages. ;.......................................................................................................................................... ; quote-ampersand ; Type: Boolean ; Default: yes ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should output unadorned & characters as &. ;.......................................................................................................................................... ; quote-marks ; Type: Boolean ; Default: no ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should output " characters as " as is preferred by some editing environments. ; The apostrophe character ' is written out as ' since many web browsers don't yet support ' ;.......................................................................................................................................... ; quote-nbsp ; Type: Boolean ; Default: yes ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should output non-breaking space characters as entities, ; rather than as the Unicode character value 160 (decimal). ;.......................................................................................................................................... ; show-warnings ; Type: Boolean ; Default: yes ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should suppress warnings. This can be useful when a few errors are hidden in a flurry of warnings. ;.......................................................................................................................................... ; split ; Type: Boolean ; Default: no ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should create a sequence of slides from the input, ; splitting the markup prior to each successive H2. The slides are written to "slide001.html", "slide002.html" etc. ;.......................................................................................................................................... ; tidy-mark ; Type: Boolean ; Default: yes ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should add a meta element to the document head to indicate that the document has been tidied. ; Tidy won't add a meta element if one is already present. ;.......................................................................................................................................... ; tab-size ; Type: Integer ; Default: 4 ; Example: 0, 1, 2, ... ; This option specifies the number of columns that Tidy uses between successive tab stops. ; It is used to map tabs to spaces when reading the input. Tidy never outputs tabs. ;.......................................................................................................................................... ; uppercase-tags ; Type: Boolean ; Default: no ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should output tag names in upper case. ; The default is no, which results in lower case tag names, except for XML input, where the original case is preserved. ;.......................................................................................................................................... ; uppercase-attributes ; Type: Boolean ; Default: no ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should output attribute names in upper case. ; The default is no, which results in lower case attribute names, except for XML input, where the original case is preserved. ;.......................................................................................................................................... ; word-2000 ; Type: Boolean ; Default: no ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should go to great pains to strip out all the surplus stuff ; Microsoft Word 2000 inserts when you save Word documents as "Web pages". Doesn't handle embedded images or VML. ;.......................................................................................................................................... ; wrap ; Type: Integer ; Default: 68 ; Example: 0 (no wrapping), 1, 2, ... ; This option specifies the right margin Tidy uses for line wrapping. ; Tidy tries to wrap lines so that they do not exceed this length. Set wrap to zero if you want to disable line wrapping. ;.......................................................................................................................................... ; wrap-attributes ; Type: Boolean ; Default: no ; Example: y/n, yes/no, t/f, true/false, 1/0 wrap-script-literals ; This option specifies if Tidy should line wrap attribute values, for easier editing. ; This option can be set independently of wrap-script-literals. ;.......................................................................................................................................... ; wrap-asp ; Type: Boolean ; Default: yes ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should line wrap text contained within ASP pseudo elements, which look like: <% ... %>. ;.......................................................................................................................................... ; wrap-jst ; Type: Boolean ; Default: yes ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should line wrap text contained within JSTE pseudo elements, which look like: <# ... #>. ;.......................................................................................................................................... ; wrap-php ; Type: Boolean ; Default: yes ; Example: y/n, yes/no, t/f, true/false, 1/0 ; This option specifies if Tidy should line wrap text contained within PHP pseudo elements, which look like: <?php ... ?>. ;.......................................................................................................................................... ; wrap-script-literals ; Type: Boolean ; Default: no ; Example: y/n, yes/no, t/f, true/false, 1/0 wrap-attributes ; This option specifies if Tidy should line wrap string literals that appear in script attributes. ; Tidy wraps long script string literals by inserting a backslash character before the line break ;------------------------------------------------------------------------------------------------------------------------------------------ ;*EOF*