xsl-list
[Top] [All Lists]

RE: parsing post script

2003-11-25 00:39:11

thanks dude, thats what I'm doing(more or less). I've stripped all the font
and formatting info and converted the simple text into a basic XML doc which
specifies the X,Y position for each element.
Next I hope to define a transform which will convert the absolute
coordinates into more meaningful numbers like the column indices of a table
etc...
Any inputs in this regard will be more than welcome.
With Regards,
Karthikeyan.R
---------------------------------
The will to do, the soul to dare


-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com]On Behalf Of 
Jim Fuller
Sent: Tuesday, November 25, 2003 12:50 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] parsing post script


Well you are going to have a problem if you are expecting to
'bring in' a
postscript file into an xslt transform. For example, the
document() function
will whine because it needs well formed xml. In xslt 2.0 there is an
unparsed-text() function which would bring in the file, I
believe ( use
latest saxon to exp the delights of XSLT 2.0 ).

If you could just take the contents of a ps file and wrap it
with a root
element that still might be an issue, as I once had the
pleasure of actually
programming something rather complex in postscript ( and yes
David is right,
it's a fully featured language )....and I think you would end
up having to
use d-o-e or CDATA[].

Just because XSLT is good at a job, doesn't mean it will be
good for all
jobs. I would suggest maybe, if you are mining content, to
convert ps to
html ( use http://webdesign.about.com/cs/htmlconverters/ )
and tidy it up
using html tidy, then bringing in the data.

gl, jim fuller

-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com] On Behalf Of
Karthikeyan
Ramnath
Sent: Tuesday, November 25, 2003 4:28 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com


Actually I dont need to render a PS file, but instead I've
got to parse an
existing file and try to make sense out of it, as in, I
should be able to
extract the data.
How tough would that be with XSLT and what other approach
could I follow.
Right now, I'm manually reading the values enclosed in
brackets()... which
is only a hack to get to the data...
kr.
---------------------------------
The will to do, the soul to dare


-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com]On Behalf Of 
David
Carlisle
Sent: Monday, November 24, 2003 10:24 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] parsing post script




  Guys, I require to parse a PS file. I know that its
possible to render a PS
  file with XSLT, but is the reverse possible?
  Thanks,
  Karthikeyan.r

It would be very hard to produce any usable Postscript directly from
XSLT, and virtually impossible to read PostScript.

PostScript is a fully featured programming language. It is no doubt
theoretically possible to write a PostScript interpreter in
XSLT, but
it would be thousands of lines of code, and rather slow, compared to
using a real postscript interpreter as built in to a
PS printer, or an emulator such as ghostscript.

David

--
http://www.dcarlisle.demon.co.uk/matthew

______________________________________________________________
__________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on
a proactive
anti-virus service working around the clock, around the
globe, visit:
http://www.star.net.uk
______________________________________________________________
__________

 XSL-List info and archive:
http://www.mulberrytech.com/xsl/xsl-list




DISCLAIMER: This email is bound by the terms and conditions described at
http://www.subexgroup.com/mail-disclaimer.htm



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


DISCLAIMER: This email is bound by the terms and conditions described at 
http://www.subexgroup.com/mail-disclaimer.htm



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>