Encode-UTR22

 view release on metacpan or  search on metacpan

examples/Utr22c.clb  view on Meta::CPAN

^!IfTrue ^$IsEmpty(^%alt%)$ Skip
 alt="1"
^!IfTrue ^$IsEmpty(^%min%)$ Skip
 min="^%min%"
^!IfTrue ^$IsEmpty(^%max%)$ Skip
 max="^%max%"
^!Clip endxml
^!Goto End
:class-ref
^!Set %name%=^?{Class Name}; %id%=^?{ID}; %neg%=^?{Neg}; %min%=^?{Minimum}; %max=^?{Maximum}
 name="^%name%"
^!IfTrue ^$IsEmpty(^%neg%)$ Skip
 neg="1"
^!IfTrue ^$IsEmpty(^%min%)$ Skip
 min="^%min%"
^!IfTrue ^$IsEmpty(^%max%)$ Skip
 max="^%max%"
^!IfTrue ^$IsEmpty(^%id%)$ Skip
 id="^%id%"
^!Clip "endxml" "/"
^!Goto End
:context-ref
^!Set %name%=^?{Context Name}; %id%=^?{ID}; %min%=^?{Minimum}; %max=^?{Maximum}
 name="^%name%"
^!IfTrue ^$IsEmpty(^%min%)$ Skip
 min="^%min%"
^!IfTrue ^$IsEmpty(^%max%)$ Skip
 max="^%max%"
^!IfTrue ^$IsEmpty(^%id%)$ Skip
 id="^%id%"
^!Clip "endxml" "/"
^!Goto End
:eos
^!InsertText "/>^P"
!^Goto End
:class
^!Set %name%=^?{Class Name}; %size%=^?{Size=_|bytes}
 name="^%name%"
^!IfTrue ^$IsEmpty(^%size%)$ Skip
 size="bytes"
^!Clip endxml
^!Goto End
:class-include
^!Set %name%=^?{Class Name}; %size%=^?{Size=_|bytes}; %first%=^?{First}; %last%=^?{Last}
 name="^%name%" first="^%first%" last="^%last%"
^!IfTrue ^$IsEmpty(^%size%)$ Skip
 size="bytes"
^!Clip "endxml" "/"
^!Goto End


H=" "


H=";Testing"


H="testutr22"
^!Clip InitDir
^!Set %testseq%=^?{Test Sequence=^%testseq%}
^!Menu File/Save
; ^!Prompt "^%MyAppDir%testutr22.exe -o "^%MyAppDir%testutr22.lst" -bu "^$GetDocName$" "^%testseq%""
^!Set %testresult%=^$GetOutput("^%MyAppDir%testutr22.exe -o "^%MyAppDir%testutr22.lst" -bu "^$GetDocName$" "^%testseq%"")$
^!IfFileExist "^%MyAppDir%testutr22.lst" NEXT ELSE failed
^!Open "^%MyAppDir%testutr22.lst" /R
^!Goto END
:failed
^!IfFileExist "^$GetAppPath$StdError.txt" NEXT ELSE END
^!Open "^$GetAppPath$StdError.txt"



H="Web page"
^!Clip InitDir
^!Menu File/Save
^!Url ^$FileToUrl(^$GetDocName$)$


H="Compile TEC"
^!Clip InitDir
^!Set %fname%=^$ChangeFileExt(^$GetDocName$;"tec")$
^!Set %outfile%=^?{(T=S;F="TEC Files(*.tec)|*.tec")Save As=^%fname%}
^!Menu File/Save
;^!Prompt ^%MyAppDir%utr22tec.exe "^$GetDocName$" "^%outfile%"
^!Set %output%=^$GetOutput(^%MyAppDir%utr22tec.exe "^$GetDocName$" "^%outfile%")$
^!If ^%output% = "" quiet
^!Toolbar New Document
^%output%
:quiet
^!IfFileExist "^$GetAppPath$StdError.txt" NEXT ELSE END
^!Open "^$GetAppPath$StdError.txt"



H="_InitDir"
^!Set %MyAppDir%=^$GetValue(UTR22:AppDir)$
^!IfFileExist "^%MyAppDir%\testutr22.exe" finish
^!Set %MyAppDir%=^?{(T=D)UTR22 Support Files=^%MyAppDir%}
^!SaveValue UTR22:AppDir=^%MyAppDir%
:finish


H="_endxml"
^!If ^&="/" oneline
^!InsertText >^P^P^$StrFill(" ";^%Indent%)$</^%Element%>
^!Keyboard UP
^!InsertText ^$StrFill(" ";^$Calc(^%Indent%+2)$)$
^!Keyboard END
^!Goto End
:oneline
^!InsertText />^P^$StrFill(" ";^%Indent%)$



( run in 1.398 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )