[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fwd: SV: [plt-scheme] XML and PLT - problem is parsing instructions!



You did put a ? before the > at the end of your processing instruction, right?

This works fine for me:

> (read-xml (open-input-string "<hi><?PUBLIC blah blah blah something?> non-pi</hi>"))
#(struct:document
  #(struct:prolog () #f ())
  #(struct:element
    #(struct:location 1 1 1)
    #(struct:location 1 52 52)
    hi
    ()
    (#(struct:pi #(struct:location 1 5 5) #(struct:location 1 40 40) |PUBLIC| "blah blah blah something")
     #(struct:pcdata #(struct:location 1 40 40) #(struct:location 1 47 47) " non-pi")))
  ())
> 

If you don't put in the ? before the >, then the parser should read the
entire rest of the file and complain about a premature eof.

If this isn't the problem, please send me the specific processing instruction
that's causing trouble.

Thanks,

Paul


At Fri, 31 May 2002 10:29:47 -0400 (EDT), Matthias Felleisen wrote:
> ------------------------------------------------------------------------------
> 
> ------------------------------------------------------------------------------
> From: Petter Egesund <petter.egesund@kunnskapsforlaget.no>
> To: "'Matthias Felleisen'" <matthias@ccs.neu.edu>
> Subject: SV: [plt-scheme] XML and PLT - problem is parsing instructions!
> Date: Fri, 31 May 2002 16:24:16 +0200
> X-Mailer: Internet Mail Service (5.5.2653.19)
> 
> Sure,
> 
> try to insert a valid processing instruction like "<?PUB xxx>" in the
> xml-code (not in top), and you will see what I mean!
> 
> I was talking about the standard XML-package wich follows default with the
> package and not SSAX!
> 
> In other regards the parser is really excellent!
> 
> Cheers,
> 
> Petter Egesund
> 
> 
> 
> 
> 
> -----Opprinnelig melding-----
> Fra: Matthias Felleisen [mailto:matthias@ccs.neu.edu]
> Sendt: 31. mai 2002 13:59
> Til: Petter Egesund
> Kopi: 'plt-scheme@fast.cs.utah.edu'
> Emne: Re: [plt-scheme] XML and PLT - problem is parsing instructions!
> 
> 
> 
> Would you mind elaborating on these processing instructions? 
> 
> -- Matthias
> 
> 
> At Fri, 31 May 2002 11:14:38 +0200, Petter Egesund wrote:
> > It seems the problem with the XML-module is that is does not handle
> > processing instructions other places than in the top of the file,
> > otherwise it crashes, after taking a break!
> > 
> > About speed; the parser seems to compete with Java, which is quite good!
> > 
> > Regards,
> > 
> > Petter Egesund
> > (now happily using PLT for this project again!)
> > 
> > ###########################################
> > 
> > This message has been scanned by F-Secure Anti-Virus for Microsoft
> Exchange.
> > For more information, connect to http://www.F-Secure.com/
> ###########################################
> 
> This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
> For more information, connect to http://www.F-Secure.com/
>