http://www.aftergrasp.com/download/agsetup_20080402.exe
----------------------------------------------------------------------------
Wed, 02 April 2008
Long standing bug in Postscript printing detection fixed. Was related
to using a different function for detection and injection detect.
Bug in combining link regions created with <A HREF=...> </A> tags
fixed. It was creating multiple hotspots or PDFMARK links which could
cause problems, particular for some Postscript interpreters.
Some small refinements to date/time routines.
XML array write reference code updated. It takes a array and a filename,
and writes a standard XML file (although a big sparse with excessive
whitespace). Here is the updated example:
XMLwrite:
declare a fname
filedelete @fname
filesendln @fname "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>"
filesendln @fname
local depth -1
writeone &a a->root ""
filesendln @fname
return
FixXmlStr:
declare s
return strreplace(@s, "¦","¦")
FixXmlQuotes:
declare s
return strreplace(@s, @quote, """, "<", "<", ">", ">")
writeattrib:
declare a depth
local result ""
local list strlist(arrayattrib(a))
strsort list
strsort "#" list
for j in @list
result = @result$strrepeat(@depth,strchr(9))$@j$"="$@quote$FixXmlQuotes(@a{@j})$@quote$@crlf
next
return strleft(@result, strlen(@result)-2)
writeone:
declare a j parent
if @j==strpad0(@j+0,0) ; if number
local name @parent
local indentdepth @depth-1
else
local name @j
local indentdepth @depth
endif
if a->dim1==0
filesendln @fname strrepeat(@indentdepth,strchr(9))$"<"$@name$">"
filesendln @fname strrepeat(@indentdepth,strchr(9))$@a
filesendln @fname strrepeat(@indentdepth,strchr(9))$"</"$@name$">"$@crlf
return
endif
local attribcount array(arrayattrib(&a))->dim1
local aidx array(arrayindex(&a))
local indexcount aidx->dim1
if @attribcount
filesendln @fname strrepeat(@indentdepth,strchr(9))$"<"$@name
filesend @fname FixXmlStr(writeattrib(&a,@indentdepth+1))
if @indexcount
filesendln @fname ">"
if @indentdepth<0
filesendln @fname
endif
writewalk &a @indentdepth+1 @name
filesendln @fname strrepeat(@indentdepth,strchr(9))$"</"$@name$">"$@crlf
else
filesendln @fname " />"$@crlf
endif
else
if @indexcount
local firstindex @aidx[0]
local isnumber @firstindex==strpad0(@firstindex+0,0) ; if number
if !@isnumber
filesendln @fname strrepeat(@indentdepth,strchr(9))$"<"$@name$">"
endif
writewalk &a @indentdepth+1 @name
if !@isnumber
filesendln @fname strrepeat(@indentdepth,strchr(9))$"</"$@name$">"$@crlf
endif
else
filesendln @fname strrepeat(@indentdepth,strchr(9))$"<"$@name$" />"
endif
endif
return
writewalk:
declare a depth parent
for j inarray array(arrayindex(a))
writeone &a[@j] @j @parent
next
return
----------------------------------------------------------------------------