Page Date
2004-05-18
DD-Software
Kapitel zurück / previous Chapter
Main Index
 
Seite zurück / previous page
Backward
Seite vor / next page
Forward
 
Seitenanfang/TopOfPage
Top
Seitenende/EndOfPage
Bottom
MyWbtHelp current version

TIDYCOM


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



;------------------------------------------------------------------------------------------------------------------------------------------
; TIDYCOM.WBT
; A WinBatch wrapper for André Blavier's "TidyCOM.dll".
;------------------------------------------------------------------------------------------------------------------------------------------
; 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.
;
; For more information go to:
; - http://perso.wanadoo.fr/ablavier/TidyCOM/
; - http://tidy.sourceforge.net/
; - and study this document.
; Use on your own risk.
;
; Detlev Dalitz.20020601
;------------------------------------------------------------------------------------------------------------------------------------------

returncode = 1
startfolder = DirGet()

If IsDefined(param1) Then sourcefile = param1
; If there is no filename available from param1, then ...
If !IsDefined(sourcefile)
   AFN_title     = "TIDYCOM.WBT  - choose a filename -"
   AFN_directory = "H:\DD-HOME\htm" ; Choose your own startfolder here.
   AFN_filetypes = "HTML Files|*.htm*|Text Files|*.txt|All Files|*.*"
   AFN_filename  = "*.htm*"
   AFN_flag      = 1
   sourcefile = AskFilename(AFN_title,AFN_directory,AFN_filetypes,AFN_filename,AFN_flag)
EndIf

sourcefileroot = FileRoot(sourcefile)
sourcefolder = FilePath(sourcefile)
targetfile = StrCat(sourcefolder,sourcefileroot,".tidy.htm")
errorfile  = StrCat(sourcefolder,sourcefileroot,".tidy.error.txt")
DirChange(sourcefolder)

browserexe = "iexplore.exe"
txteditexe = "notepad.exe"
htmeditexe = "WinBatch Studio.exe" ; "HTMLKit.exe" or anything else.

regsvrexe  = "regsvr32.exe"
tidycomdll = "D:\Programme\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.

Run(regsvrexe,StrCat("/s ",tidycomdll)) ; Silent install and register tidycom dll.

;..........................................................................................................................................

TidyObj = ObjectOpen("TidyCOM.TidyObject.1")

TidyObj_Options = TidyObj.Options

; --- Operation Options ---

TidyObj_Options.Reset

TidyObj_Options.ErrorFile = errorfile

TidyObj_Options.Markup = @TRUE                     ; boolean @true=default
;TidyObj_Options.Markup = @false                   ; boolean

;TidyObj_Options.Quiet = @true                     ; boolean
TidyObj_Options.Quiet = @FALSE                     ; boolean @false=default

TidyObj_Options.ShowWarnings = @TRUE               ; boolean @true=default
;TidyObj_Options.ShowWarnings = @false             ; boolean

TidyObj_Options.KeepTime = @TRUE                   ; boolean @true=default
;TidyObj_Options.KeepTime = @false                 ; boolean

;TidyObj_Options.Split = @true                     ; boolean
TidyObj_Options.Split = @FALSE                     ; boolean @false=default

;TidyObj_Options.GnuEmacs = @true                  ; boolean
TidyObj_Options.GnuEmacs = @FALSE                  ; boolean @false=default

; --- Markup Options ---

TidyObj_Options.Doctype = "auto"                   ; string auto=default
;TidyObj_Options.Doctype = "omit"                  ; string
;TidyObj_Options.Doctype = "strict"                ; string
;TidyObj_Options.Doctype = "loose"                 ; string
;TidyObj_Options.Doctype = "transitional"          ; string
;TidyObj_Options.Doctype = "formal public identifier (FPI)" ; user specified string ; For example: "-//ACME//DTD HTML 3.14159//EN"

;TidyObj_Options.TidyMark = @true                  ; boolean @true=default
TidyObj_Options.TidyMark = @FALSE                  ; boolean

;TidyObj_Options.HideEndtags = @true               ; boolean
TidyObj_Options.HideEndtags = @FALSE               ; boolean @false=default

;TidyObj_Options.EncloseText = @true               ; boolean
TidyObj_Options.EncloseText = @FALSE               ; boolean @false=default

;TidyObj_Options.EncloseBlockText = @true          ; boolean
TidyObj_Options.EncloseBlockText = @FALSE          ; boolean @false=default

TidyObj_Options.NewEmptyTags      = ""             ; string of tagnames ; -none-=default
TidyObj_Options.NewInlineTags     = ""             ; string of tagnames ; -none-=default
TidyObj_Options.NewBlocklevelTags = ""             ; string of tagnames ; -none-=default
TidyObj_Options.NewPreTags        = ""             ; string of tagnames ; -none-=default

; --- Cleanup Options ---

;TidyObj_Options.Clean = @true                     ; boolean
TidyObj_Options.Clean = @FALSE                     ; boolean @false=default

;TidyObj_Options.DropFontTags = @true              ; boolean
TidyObj_Options.DropFontTags = @FALSE              ; boolean @false=default

;TidyObj_Options.LogicalEmphasis = @true           ; boolean
TidyObj_Options.LogicalEmphasis = @FALSE           ; boolean @false=default

TidyObj_Options.DropEmptyParas = @TRUE             ; boolean @true=default
;TidyObj_Options.DropEmptyParas = @false           ; boolean

;TidyObj_Options.Word2000 = @true                  ; boolean
TidyObj_Options.Word2000 = @FALSE                  ; boolean @false=default

TidyObj_Options.FixBackslash = @TRUE               ; boolean @true=default
;TidyObj_Options.FixBackslash = @false             ; boolean

TidyObj_Options.FixBadComments = @TRUE             ; boolean @true=default
;TidyObj_Options.FixBadComments = @false           ; boolean

TidyObj_Options.AltText = ""                       ; string -none-=default

; --- XML Options ---

; TidyObj_Options.InputXml = @true                 ; boolean
TidyObj_Options.InputXml = @FALSE                  ; boolean @false=default

; TidyObj_Options.OutputXml = @true                ; boolean
TidyObj_Options.OutputXml = @FALSE                 ; boolean @false=default

; TidyObj_Options.OutputXhtml = @true              ; boolean
TidyObj_Options.OutputXhtml = @FALSE               ; boolean @false=default

; TidyObj_Options.AddXmlDecl = @true               ; boolean
TidyObj_Options.AddXmlDecl = @FALSE                ; boolean @false=default

; TidyObj_Options.AssumeXmlProcins = @true         ; boolean
TidyObj_Options.AssumeXmlProcins = @FALSE          ; boolean @false=default

; TidyObj_Options.AddXmlSpace = @true              ; boolean
TidyObj_Options.AddXmlSpace = @FALSE               ; boolean @false=default

; --- Encoding Options ---

;TidyObj_Options.CharEncoding = 0                  ; CharEncoding 0=raw
;TidyObj_Options.CharEncoding = 1                  ; CharEncoding 1=ascii
TidyObj_Options.CharEncoding = 2                   ; CharEncoding 2=latin1
;TidyObj_Options.CharEncoding = 3                  ; CharEncoding 3=utf8
;TidyObj_Options.CharEncoding = 4                  ; CharEncoding 4=so2022
;TidyObj_Options.CharEncoding = 5                  ; CharEncoding 5=mac
;TidyObj_Options.CharEncoding = 6                  ; CharEncoding 6=win1252

;TidyObj_Options.NumericEntities = @true           ; boolean
TidyObj_Options.NumericEntities = @FALSE           ; boolean @false=default

;TidyObj_Options.QuoteMarks = @true                ; boolean
TidyObj_Options.QuoteMarks = @FALSE                ; boolean @false=default

TidyObj_Options.QuoteNbsp = @TRUE                  ; boolean @true=default
;TidyObj_Options.QuoteNbsp = @false                ; boolean

TidyObj_Options.QuoteAmpersand = @TRUE             ; boolean @true=default
;TidyObj_Options.QuoteAmpersand = @false           ; boolean

; --- Layout Options ---

TidyObj_Options.Indent = 0                         ; IndentScheme 0=NoIndent
;TidyObj_Options.Indent = 1                        ; IndentScheme 1=IndentBlocks
;TidyObj_Options.Indent = 2                        ; IndentScheme 2=AutoIndent

TidyObj_Options.IndentSpaces = 2                   ; integer

TidyObj_Options.Wrap = 0                           ; integer 0=NoWrap 68=default

TidyObj_Options.TabSize = 3                        ; integer

;TidyObj_Options.IndentAttributes = @true          ; boolean
TidyObj_Options.IndentAttributes = @FALSE          ; boolean @false=default

;TidyObj_Options.WrapAttributes = @true            ; boolean
TidyObj_Options.WrapAttributes = @FALSE            ; boolean @false=default

;TidyObj_Options.WrapScriptLiterals = @true        ; boolean
TidyObj_Options.WrapScriptLiterals = @FALSE        ; boolean @false=default

TidyObj_Options.WrapAsp = @TRUE                    ; boolean @true=default
;TidyObj_Options.WrapAsp = @false                  ; boolean

TidyObj_Options.WrapJste = @TRUE                   ; boolean @true=default
;TidyObj_Options.WrapJste = @false                 ; boolean

TidyObj_Options.WrapPhp = @TRUE                    ; boolean @true=default
;TidyObj_Options.WrapPhp = @false                  ; boolean

;TidyObj_Options.BreakBeforeBr = @true             ; boolean
TidyObj_Options.BreakBeforeBr = @FALSE             ; boolean @false=default

;TidyObj_Options.UppercaseTags = @true             ; boolean
TidyObj_Options.UppercaseTags = @FALSE             ; boolean @false=default

;TidyObj_Options.UppercaseAttributes = @true       ; boolean
TidyObj_Options.UppercaseAttributes = @FALSE       ; boolean @false=default

;TidyObj_Options.LiteralAttributes = @true         ; boolean
TidyObj_Options.LiteralAttributes = @FALSE         ; boolean @false=default

;..........................................................................................................................................

; --- testcase 1
TidyObj.TidyToFile (sourcefile, targetfile) ; file to file converting


; --- testcase 2
;str = TidyObj.TidyToMem (sourceFile) ; file to mem converting
;fout = FileOpen(targetfile,"WRITE")
;FileWrite(fout,str)
;FileClose(fout)


; --- testcase 3
;bbsize = FileSize(sourcefile)
;bb = BinaryAlloc(bbsize)
;BinaryRead(bb,sourcefile)
;str = BinaryPeekStr(bb,0,bbsize)
;BinaryFree(bb)
;str = TidyObj.TidyMemToMem (str) ; mem to mem converting
;bbsize = StrLen(str)
;bb = BinaryAlloc(bbsize)
;BinaryPokeStr(bb,0,str)
;BinaryWrite(bb,targetfile)
;BinaryFree(bb)

;..........................................................................................................................................

TotalWarnings = TidyObj.TotalWarnings
TotalErrors = TidyObj.TotalErrors

StatusList = ""
StatusList = ItemInsert(StrCat("TotalErrors",@TAB,TotalErrors),-1,StatusList,@CR)
StatusList = ItemInsert(StrCat("TotalWarnings",@TAB,TotalWarnings),-1,StatusList,@CR)
AskItemlist("TIDY Status",StatusList,@CR,@UNSORTED,@SINGLE)

If (TotalErrors>0)
   TotalErrors = TotalErrors - 1 ; zero based
   TotalErrorsList = ""
   For i=0 To TotalErrors
      TotalErrorsList = ItemInsert(TidyObj.Error(i),-1,TotalErrorsList,@TAB)
   Next
   IntControl(63,100,100,900,900)
   AskItemlist("TIDY Errors",StrReplace(TotalErrorsList,@CRLF,@TAB),@TAB,@UNSORTED,@SINGLE)
EndIf

If (TotalWarnings>0)
   TotalWarnings = TotalWarnings - 1 ; zero based
   TotalWarningsList = ""
   For i=0 To TotalWarnings
      TotalWarningsList = ItemInsert(TidyObj.Warning(i),-1,TotalWarningsList,@TAB)
   Next
   IntControl(63,100,100,900,900)
   AskItemlist("TIDY Warnings",StrReplace(TotalWarningsList,@CRLF,@TAB),@TAB,@UNSORTED,@SINGLE)
EndIf

IntControl(63,100,100,900,900)
AskItemlist("TIDY Comments",StrReplace(TidyObj.Comments,@CRLF,@TAB),@TAB,@UNSORTED,@SINGLE)


; ----------------------
ObjectClose(TidyObj)
Run(regsvrexe,StrCat("/u /s ",tidycomdll)) ; silent uninstall tidycom
; ----------------------

If FileExist(targetfile)
   Run(browserexe,targetfile)
   TimeDelay(2)
   Run(htmeditexe,targetfile)
EndIf

If FileExist(errorfile)
   RunWait(txteditexe,errorfile)
   FileDelete(errorfile)
EndIf

returncode = 0

:CANCEL
DirChange(startfolder)

Drop(browserexe,errorfile,htmeditexe,i,regsvrexe,sourcefile,sourcefileroot)
Drop(sourcefolder,startfolder,StatusList,targetfile,tidycomdll)
Drop(TotalErrors,TotalErrorsList,TotalWarnings,TotalWarningsList,txteditexe)
DropWild("TidyObj*")
DropWild("AFN*")

If (IntControl(77,80,0,0,0)>0) Then Return (returncode)

Exit
;------------------------------------------------------------------------------------------------------------------------------------------



;------------------------------------------------------------------------------------------------------------------------------------------
; 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
; (&amp;, &lt;, &gt; and &quot;) 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 &amp;.
;..........................................................................................................................................
; 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 &quot; as is preferred by some editing environments.
; The apostrophe character ' is written out as &#39; since many web browsers don't yet support &apos;
;..........................................................................................................................................
; 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*




Page Date
2004-05-18
DD-Software
Kapitel zurück / previous Chapter
Main Index
 
Seite zurück / previous page
Backward
Seite vor / next page
Forward
 
Seitenanfang/TopOfPage
Top
Seitenende/EndOfPage
Bottom
MyWbtHelp current version