So the problem with initial file was the "degree" symbol
in Unit="°C". So the error is

|xml error 4 at (10 35): not well-formed (invalid token): assert
|       (assert~error)0

To be able to hanle that the top PI must be

<?xml version="1.0" encoding="UTF-8"?>

And the file should probably contain the UTF-8 invisible
signature (marker) as the first few symbols.

Once it is saved correctly as UTF-8 even with the comment,
there is no error.


I was not able to reproduce the following error:

>    process_psax3_ fread jpath 'C:\temp\testhead2.xml'
> |domain error: Parse
> |   0=    Parse PARSER;y;(PARLEN=:#y);0+1

Can you elaborate when it happens and how to reproduce.


Also please attach in a personal response (forum will lose it)
the changes that you had to make the to the xml/sax script files.




--- Bj�rn Helgason <[EMAIL PROTECTED]> wrote:

> I have changed a number of scripts and it is working now.
> 
> I just love the chess demo
> 
> All the test scripts seem to work fine
> 
> I am looking forward to using this now.
> 
> I did try a first
> 
> When I apply it to a file I am working on I get an error on one line
> 
> <!-- This file was generated by Unfors Xi View -->
> 
> When I remove it I get the file processed fine
> 
>    process_psax3_ fread jpath 'C:\temp\testhead2.xml'
> |domain error: Parse
> |   0=    Parse PARSER;y;(PARLEN=:#y);0+1
> 
> 
> 
> ------------------------------------- this file gets the error   --
> testhead2.xml
> <?xml version='1.0'?>
> 
> <!-- This file was generated by Unfors Xi View -->
> 
> <XiExposureLog>
> <FileInfo XiFileVersion="1.1" XiViewVersion="1.1.25" Date="2007-02-16"
> Time="11:06" ExposureCount="15" />
> <XiExposure Date="2007-02-16" Time="11:00:29">
> <Xi XiFormat="1.2" XiFirmwareVersion="4.00" DetectorFirmwareVersion="2.20"
> XiSerialNumber="131338" DetectorSerialNumber="136369" ExposureNumber="6"
> Sensor="CT Dose">
> <Value Type="Dose" Unit="Gy" Format="Float">0.00441092</Value>
> <Value Type="Temperature" Unit="°C" Format="Float">22.425</Value>
> <Value Type="Pressure" Unit="kPa" Format="Float">96.3245</Value>
> <Checksum Type="CRC16">647F</Checksum>
> </Xi>
> 
> </XiExposure>
> ......
> 
> ------------------------------------------------------------------- this
> works fine -- testhead.xml
> <?xml version='1.0'?>
> 
> <XiExposureLog>
> <FileInfo XiFileVersion="1.1" XiViewVersion="1.1.25" Date="2007-02-16"
> Time="11:06" ExposureCount="15" />
> <XiExposure Date="2007-02-16" Time="11:00:29">
> <Xi XiFormat="1.2" XiFirmwareVersion="4.00" DetectorFirmwareVersion="2.20"
> XiSerialNumber="131338" DetectorSerialNumber="136369" ExposureNumber="6"
> Sensor="CT Dose">
> <Value Type="Dose" Unit="Gy" Format="Float">0.00441092</Value>
> <Value Type="Temperature" Unit="°C" Format="Float">22.425</Value>
> <Value Type="Pressure" Unit="kPa" Format="Float">96.3245</Value>
> <Checksum Type="CRC16">647F</Checksum>
> </Xi>
> 
> </XiExposure>
> ........
> -----------------------------------------------------------------------
>    process_psax3_ fread jpath 'C:\temp\testhead.xml'
> XiExposureLog() {
>   
> FileInfo(XiFileVersion=1.1,XiViewVersion=1.1.25,Date=2007-02-16,Time=11:06,ExposureCount=15)
> {
>   }
>   XiExposure(Date=2007-02-16,Time=11:00:29) {
>    
>
Xi(XiFormat=1.2,XiFirmwareVersion=4.00,DetectorFirmwareVersion=2.20,XiSerialNumber=131338,DetectorSerialNumber=136369,ExposureNumber=6,Sensor=CT
> Dose) {
>       Value(Type=Dose,Unit=Gy,Format=Float) {
>         0.00441092
>       }
>       Value(Type=Temperature,Unit=°C,Format=Float) {
>         22.425
>       }
>       Value(Type=Pressure,Unit=kPa,Format=Float) {
>         96.3245
>       }
>       Checksum(Type=CRC16) {
>         647F
>       }
>     }
>   }
>   XiExposure(Date=2007-02-16,Time=11:00:38) {
> ......
> 
> 
> This is the file I mentioned in an earlier message in UTF-8
> 
> When this file comes directly from the instrument it looks like this:
> 
>    process_psax3_ fread jpath 'C:\temp\head.xml'
> XiExposureLog() {
>   
> FileInfo(XiFileVersion=1.1,XiViewVersion=1.1.25,Date=2007-02-16,Time=11:06,ExposureCount=15)
> {
>   }
>   XiExposure(Date=2007-02-16,Time=11:00:29) {
>    
>
Xi(XiFormat=1.2,XiFirmwareVersion=4.00,DetectorFirmwareVersion=2.20,XiSerialNumber=131338,DetectorSerialNumber=136369,ExposureNumber=6,Sensor=CT
> Dose) {
>       Value(Type=Dose,Unit=Gy,Format=Float) {
>         0.00441092
>       }
> |xml error 4 at (10 32): not well-formed (invalid token): assert
> |       (assert~error)0
> 
> I get exactly the same error using XMLNotepad on the same line and same char
> (10 32)
> Actually XMLNotepad reports Line 10 Position 33
> 
> And last I was testing now how I would catch these tags
> 
>    a=:process_psax3_ fread jpath 'C:\temp\testdcm.xml'
> file-format() {
>   meta-header(xfer=1.2.840.10008.1.2.1,name=LittleEndianExplicit) {
>     element(tag=0002,0000,vr=UL,vm=1,len=4,name=MetaElementGroupLength) {
>       178
>     }
> ......
> 
> The output comes to the session manager and nothing comes into a
> 
> Do I run this in jconsole with stdout to get the results?
> 
> Is there some other trick available?
> 
> 
> 
> 2007/2/21, Björn Helgason <[EMAIL PROTECTED]>:
> >
> >
> > There seem to be some missing .ijs in requires and loads
> >
> >     require'xml/sax'
> >
> > needs to be changed to
> >
> >    require'~addons/xml/sax/sax.ijs'
> >
> >     require 'xml/sax/expat'
> >
> > needs to be changed to
> >
> >    require '~addons/xml/sax/expat.ijs'
> >
> > I have just looked at this a short time.
> >
> >
> >
> > 2007/2/20, Oleg Kobchenko <[EMAIL PROTECTED]>:
> > >
> > > This is very mysterious, because the installation
> > > looks good.
> > >
> > > The only way to proceed that I see is to
> > > launch the debuger, Ctrl+K and re-run those
> > > phrases.
> > >
> > > When it breaks, see values of arguments.
> > > If it doesn't get clear, please copy and send the stack
> > > and the value of parameters, variables, etc.
> > >
> > >
> > > --- Bj�rn Helgason <[EMAIL PROTECTED]> wrote:
> > >
> > > >     b=:>@{."1 dirtree jpath '~addons/xml/sax'
> > > >
> > > >    $b
> > > > 41 46
> > > >
> > > >
> > > > c:\j601\addons\xml\sax\expat.ijs
> > > > c:\j601\addons\xml\sax\filewriter.ijs
> > > > c:\j601\addons\xml\sax\history.txt
> > > > c:\j601\addons\xml\sax\manifest.ijs
> > > > c:\j601\addons\xml\sax\sax.ijs
> > > > c:\j601\addons\xml\sax\stringwriter.ijs
> > > > c:\j601\addons\xml\sax\writer.ijs
> > > > c:\j601\addons\xml\sax\doc\expat.html
> > > > c:\j601\addons\xml\sax\doc\expat.png
> > > > c:\j601\addons\xml\sax\doc\sax.html
> > > > c:\j601\addons\xml\sax\doc\style.css
> > > > c:\j601\addons\xml\sax\doc\valid-xhtml10.png
> > > > c:\j601\addons\xml\sax\lib\build.txt
> > > > c:\j601\addons\xml\sax\lib\changes.txt
> > > > c:\j601\addons\xml\sax\lib\copying.txt
> > > > c:\j601\addons\xml\sax\lib\expat.h
> > > > c:\j601\addons\xml\sax\lib\libexpat.dll
> > > > c:\j601\addons\xml\sax\lib\libexpatw.dll
> > > > c:\j601\addons\xml\sax\lib\readme.txt
> > > > c:\j601\addons\xml\sax\lib\xmlwf.exe
> > > > c:\j601\addons\xml\sax\src\xml_expat- 2.0.0.url
> > > > c:\j601\addons\xml\sax\test\chess.bmp
> > > > c:\j601\addons\xml\sax\test\chess.ijs
> > > > c:\j601\addons\xml\sax\test\chess.xml
> > > > c:\j601\addons\xml\sax\test\cnn.rss
> > > > c:\j601\addons\xml\sax\test\errors.ijs
> > > > c:\j601\addons\xml\sax\test\expat_test1.ijs
> > > > c:\j601\addons\xml\sax\test\expat_test2.ijs
> > > > c:\j601\addons\xml\sax\test\filewr1.ijs
> > > > c:\j601\addons\xml\sax\test\head.xml
> > > > c:\j601\addons\xml\sax\test\jwiki1.rss
> > > > c:\j601\addons\xml\sax\test\rss.ijs
> > > > c:\j601\addons\xml\sax\test\saxwr1.ijs
> > > > c:\j601\addons\xml\sax\test\saxwr2.ijs
> > > > c:\j601\addons\xml\sax\test\sax_test1.ijs
> > > > c:\j601\addons\xml\sax\test\sax_test2.ijs
> > > > c:\j601\addons\xml\sax\test\sax_test3.ijs
> > > > c:\j601\addons\xml\sax\test\stop.ijs
> > > > c:\j601\addons\xml\sax\test\strwr1.ijs
> > > > c:\j601\addons\xml\sax\test\table.ijs
> > > > c:\j601\addons\xml\sax\test\table.xml
> > > >
> > > > I download the xml addon to my Linux machine tonight and see how that
> > > goes
> > > >
> > > > By the way I downloaded dicom toolkit to read dicom into xml (dcm2xml)
> > > so
> > > > this xml utility will be very useful once I have it working.
> > > >
> > > > http://dicom.offis.de/dcmtk.php.en
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > 2007/2/20, Oleg Kobchenko <[EMAIL PROTECTED] >:
> > > > >
> > > > > No, there nothing else you need to run the addon,
> > > > > everything included in the addon folders for all platforms.
> > > > >
> > > > > Please verify that manifest contents matches
> > > > > actual files on disk:
> > > > >
> > > > >   load'files dir'
> > > > >
> > > > >   fread jpath '~addons/xml/sax/manifest.ijs'
> > > > >   >@{."1 dirtree jpath '~addons/xml/sax'
> > > > >
> > > > > Also the tests are intended to be run interactively:
> > > > > - open each in J script window (Ctrl+O navigate and choose)
> > > > > - Run Window (Ctrl+W)
> > > > > - scroll to bottom and run each line
> > > > >    or select all between 0 : 0 and ) and Ctrl+E
> > > > >
> > > > >
> > > > > --- Bj�rn Helgason <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > > Hmmm....
> > > > > >
> > > > > >
> > > > > > I guess I overlooked a vital step here
> > > > > > XML parser based on Expat library
> > > > > >
> > > > > > I guess I need to download a lot of things before I start trying
> > > out the
> > > > > > examples
> > > > > >
> > > > > > 2007/2/20, Bj�rn Helgason <[EMAIL PROTECTED]>:
> > > > > > >
> > > > > > > I downloaded the XML addon.
> > > > > > >
> > > > > > > I get file name error when I try the examples.
> > > > > > >
> > > > > > > Am I missing something?
> > > > > > >
> > > > > > >    load 'c:\j601\addons\xml\sax\test\sax_test2.ijs'
> > > > > > > |file name error: script
> > > > > > > |       0!:0 y[4!:55<'y'
> > > > > > >
> > > > > > >    require 'xml/sax'
> > > > > > > |file name error: script
> > > > > > > |       0!:0 y[4!:55<'y'
> > > > > > >
> > > > > > >    require '~addons/xml/sax.ijs'
> > > > > > > |file name error: script
> > > > > > > |       0!:0 y[4!:55<'y'
> > > > > > >
> > > > > > > --
> > > > > > > Bj�rn Helgason, Verkfr��ingur
> > > > > > > Fugl&Fiskur ehf, �erneyjarsund 23, Box 127
> > > > > > > 801 Gr�msnes ,t-p�st: [EMAIL PROTECTED]
> > > > > > > Skype: gosiminn, gsm: +3546985532
> > > > > > > Landslags og skr��gar�ager�, gr�fu�j�nusta
> > > > > > > http://groups.google.com/group/J-Programming
> > > > > > >
> > > > > > >
> > > > > > > T�knikunn�tta h�ndlar hi� fl�kna, sk�punarg�fa er 
> > > > > > > meistari
> > > > > einfaldleikans
> > > > > > >
> > > > > > > g��ur kennari getur stigi� � t�r �n �ess a� 
> > > > > > > glansinn fari af
> > > sk�num
> > > > > > >           /|_      .-----------------------------------.
> > > > > > >          ,'  .\  /  | Me� l�ttri lund ver�ur        |
> > > > > > >      ,--'    _,'   | Dagurinn � dag                     |
> > > > > > >     /       /       | Enn betri en g�rdagurinn  |
> > > > > > >    (   -.  |        `-----------------------------------'
> > > > > > >    |     ) |        (\_ _/)
> > > > > > >   (`-.  '--.)       (='.'=)
> > > > > > >    `. )----'        (")_(")
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Bj�rn Helgason, Verkfr��ingur
> > > > > > Fugl&Fiskur ehf, �erneyjarsund 23, Box 127
> > > > > > 801 Gr�msnes ,t-p�st: [EMAIL PROTECTED]
> > > > > > Skype: gosiminn, gsm: +3546985532
> > > > > > Landslags og skr��gar�ager�, gr�fu�j�nusta
> > > > > > http://groups.google.com/group/J-Programming
> > > > > >
> > > > > >
> > > > > > T�knikunn�tta h�ndlar hi� fl�kna, sk�punarg�fa er 
> > > > > > meistari
> > > > > einfaldleikans
> > > > > >
> > > > > > g��ur kennari getur stigi� � t�r �n �ess a� 
> > > > > > glansinn fari af
> > > sk�num
> > > > > >           /|_      .-----------------------------------.
> > > > > >          ,'  .\  /  | Me� l�ttri lund ver�ur        |
> > > > > >      ,--'    _,'   | Dagurinn � dag                     |
> > > > > >     /       /       | Enn betri en g�rdagurinn  |
> > > > > >    (   -.  |        `-----------------------------------'
> > > > > >    |     ) |        (\_ _/)
> > > > > >   (`-.  '--.)       (='.'=)
> > > > > >    `. )----'        (")_(")
> > > > > > >
> > > ----------------------------------------------------------------------
> > > > > > For information about J forums see
> > > http://www.jsoftware.com/forums.htm
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > ____________________________________________________________________________________
> > > > > Need Mail bonding?
> > > > > Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.
> > > > > http://answers.yahoo.com/dir/?link=list&sid=396546091
> > > > >
> > > ----------------------------------------------------------------------
> > > > > For information about J forums see
> > > http://www.jsoftware.com/forums.htm
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Björn Helgason, Verkfræðingur
> > > > Fugl&Fiskur ehf, Þerneyjarsund 23, Box 127
> > > > 801 Grímsnes ,t-póst: [EMAIL PROTECTED]
> > > > Skype: gosiminn, gsm: +3546985532
> > > > Landslags og skrúðgarðagerð, gröfuþjónusta
> > > > http://groups.google.com/group/J-Programming
> > > >
> > > >
> > > > Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari
> > > einfaldleikans
> > > >
> > > > góður kennari getur stigið á tær án þess að glansinn fari af 
> > > > skónum
> > > >           /|_      .-----------------------------------.
> > > >          ,'  .\  /  | Með léttri lund verður        |
> > > >      ,--'    _,'   | Dagurinn í dag                     |
> > > >     /       /       | Enn betri en gærdagurinn  |
> > > >    (   -.  |        `-----------------------------------'
> > > >    |     ) |        (\_ _/)
> > > >   (`-.  '--.)       (='.'=)
> > > >    `. )----'        (")_(")
> > > > >
> > > ----------------------------------------------------------------------
> > > > For information about J forums see http://www.jsoftware.com/forums.htm
> > >
> > >
> > >
> > >
> > > ____________________________________________________________________________________
> > >
> > > No need to miss a message. Get email on-the-go
> > > with Yahoo! Mail for Mobile. Get started.
> > > http://mobile.yahoo.com/mail
> > > ----------------------------------------------------------------------
> > > For information about J forums see http://www.jsoftware.com/forums.htm
> > >
> >
> >
> >
> > --
> > Björn Helgason, Verkfræðingur
> > Fugl&Fiskur ehf, Þerneyjarsund 23, Box 127
> > 801 Grímsnes ,t-póst: [EMAIL PROTECTED]
> > Skype: gosiminn, gsm: +3546985532
> > Landslags og skrúðgarðagerð, gröfuþjónusta
> > http://groups.google.com/group/J-Programming
> >
> >
> > Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari 
> > einfaldleikans
> >
> > góður kennari getur stigið á tær án þess að glansinn fari af skónum
> >           /|_      .-----------------------------------.
> >          ,'  .\  /  | Með léttri lund verður        |
> >      ,--'    _,'   | Dagurinn í dag                     |
> >     /       /       | Enn betri en gærdagurinn  |
> >    (   -.  |        `-----------------------------------'
> >    |     ) |        (\_ _/)
> >   (`-.  '--.)       (='.'=)
> >    `. )----'        (")_(")
> >
> 
> 
> 
> -- 
> Björn Helgason, Verkfræðingur
> Fugl&Fiskur ehf, Þerneyjarsund 23, Box 127
> 801 Grímsnes ,t-póst: [EMAIL PROTECTED]
> Skype: gosiminn, gsm: +3546985532
> Landslags og skrúðgarðagerð, gröfuþjónusta
> http://groups.google.com/group/J-Programming
> 
> 
> Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari 
> einfaldleikans
> 
> góður kennari getur stigið á tær án þess að glansinn fari af skónum
>           /|_      .-----------------------------------.
>          ,'  .\  /  | Með léttri lund verður        |
>      ,--'    _,'   | Dagurinn í dag                     |
>     /       /       | Enn betri en gærdagurinn  |
>    (   -.  |        `-----------------------------------'
>    |     ) |        (\_ _/)
>   (`-.  '--.)       (='.'=)
>    `. )----'        (")_(")
> > ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm



 
____________________________________________________________________________________
Looking for earth-friendly autos? 
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
http://autos.yahoo.com/green_center/
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to