On Mon, 30 Oct 2000, Pavel Hlavnicka wrote:
> Try to install the newest XML::Parser (2.30, I guess) and try to parse
> your document. (You'll need download and install Exapt 1.95.1)
I would do, but that breaks XML::DOM which doesn't work with XML::Parser
higher than version 2.27... Aaarrrgghh! I wonder if its possible to update
Expat, but not XML::Parser, without breaking XML::DOM *or* XML::Parser
2.27... I'll try it and let you know what happens...
Paul
> Pavel
>
> Paul Groves wrote:
>
> > On Mon, 30 Oct 2000, Pavel Hlavnicka wrote:
> >
> >
> >> Messages beginning "XML parser error" are produced by Expat. As far as I
> >> know, Expat has some problems with DTD parsing (older versions), but
> >> maybe it has no bugs, just incomplete support.
> >>
> >> We'll support new Expat in the next release.
> >>
> >> Try to parse your document with another XML parser to check it.
> >
> >
> > It all works okay (at the command line) in Saxon, which I think uses
> > �lfred as the parser. But Saxon doesn't have a perl API...
> >
> > Paul
> >
> >
> >> Paul Groves wrote:
> >>
> >>
> >>> On Sat, 28 Oct 2000, Pavel Hlavnicka wrote:
> >>>
> >>>
> >>>
> >>>> Internally Sablotron supports just two schemes: arg and file.
> >>>> URIs from the arg schemes point to buffers passed into sablotron calling
> >>>> Process etc., files are files :)
> >>>>
> >>>> If you want to use another scheme, you have to register scheme handler.
> >>>> See documentaion (perldoc XML::Sablotron) and the test script (test.pl)
> >>>> for more details.
> >>>>
> >>>> In the case you'll find it to complicated, feel free ask more specific
> >>>> questions.
> >>>
> >>>
> >>> Okay, I think I've got it to recognise the external file using the file:/
> >>> URI e.g.
> >>>
> >>> $sab->RunProcessor("arg:/template", "file://$data", "arg:/result", undef,
> >>> ["template", $template] );
> >>>
> >>> Where $template contains an XSL stylesheet and $data is a system path to
> >>> an XML file.
> >>>
> >>> But I'm now having other problems, I'm getting the error:
> >>>
> >>> Error [code:2] [URI:arg:/template] [line:1]
> >>> XML parser error 17: xml processing instruction not at start of external
> >>> entity
> >>>
> >>> Is there a way of looking up what the error codes mean?
> >>>
> >>> Does Sablotron expand external entities, e.g. if I have a
> >>> "master" xml document which acts as a container for external xml files,
> >>> will it find the contents of file1.xml etc.? e.g.
> >>>
> >>> <?xml version="1.0"?>
> >>> <!DOCTYPE all SYSTEM "all.dtd"
> >>> [
> >>> <!ENTITY % ISOlat1 PUBLIC "ISO 8879-1986//ENTITIES Added Latin1//EN" "ISOlat1.e
> >>> nt">
> >>> %ISOlat1;
> >>> <!ENTITY % Modlang SYSTEM "Modlang.ent">
> >>> %Modlang;
> >>> <!ENTITY file1 SYSTEM "file1.xml">
> >>> <!ENTITY file2 SYSTEM "file2.xml">
> >>> ]>
> >>> <all>
> >>> &file1;
> >>> &file2;
> >>> </all>
> >>>
> >>>
> >>> cheers
> >>>
> >>> Paul
> >>>
> >>>
> >>>
> >>>> Pavel
> >>>>
> >>>> Paul Groves wrote:
> >>>>
> >>>>
> >>>>
> >>>>> I'm not sure if this is a stupid question or not (I'm a bit of newbie to
> >>>>> Sablotron), but is http supported as an (input) URI scheme for
> >>>>> XML::Sablotron? If not, is it possible to reference local files using the
> >>>>> Perl API? If so, what's the syntax? i.e. what do you use instead
> >>>>> of: "arg:/data"?
> >>>>>
> >>>>> Basically, I want to supply an XSL stylesheet created dynamically by Perl
> >>>>> as the template argument (this seems to work) and an XML file (held on the
> >>>>> same server) as the data argument. I've tried supplying a reference to the
> >>>>> latter as an http URL, but I get the following error (in the Apache log)
> >>>>>
> >>>>> Error [code:237]
> >>>>> unsupported URI scheme 'http'
> >>>>>
> >>>>> and I'm not sure of the syntax for just referencing local files.
> >>>>>
> >>>>> thnaks
> >>>>>
> >>>>> Paul
> >>>>>
> >>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >>>>> Paul Groves Email: [EMAIL PROTECTED]
> >>>>> HCDT Project Officer Tel: +44 (0)1865 273 290
> >>>>> Humanities Computing Development Team
> >>>>> Humanities Computing Unit
> >>>>> Oxford University Computing Services
> >>>>> 13 Banbury Road
> >>>>> Oxford, England. OX2 6NN
> >>>>>
> >>>>> Web: http://www.oucs.ox.ac.uk/hcdt/staff.html#paul
> >>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >>>>
> >>>>
> >>>> --
> >>>> Pavel Hlavnicka
> >>>> Ginger Alliance Ltd.
> >>>> Prague; Czech Republic
> >>>>
> >>>>
> >>>
> >>>
> >>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >>> Paul Groves Email: [EMAIL PROTECTED]
> >>> HCDT Project Officer Tel: +44 (0)1865 273 290
> >>> Humanities Computing Development Team
> >>> Humanities Computing Unit
> >>> Oxford University Computing Services
> >>> 13 Banbury Road
> >>> Oxford, England. OX2 6NN
> >>>
> >>> Web: http://www.oucs.ox.ac.uk/hcdt/staff.html#paul
> >>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >>
> >>
> >> --
> >> Pavel Hlavnicka
> >> Ginger Alliance Ltd.
> >> Prague; Czech Republic
> >>
> >>
> >
> >
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > Paul Groves Email: [EMAIL PROTECTED]
> > HCDT Project Officer Tel: +44 (0)1865 273 290
> > Humanities Computing Development Team
> > Humanities Computing Unit
> > Oxford University Computing Services
> > 13 Banbury Road
> > Oxford, England. OX2 6NN
> >
> > Web: http://www.oucs.ox.ac.uk/hcdt/staff.html#paul
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
> --
> Pavel Hlavnicka
> Ginger Alliance Ltd.
> Prague; Czech Republic
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Paul Groves Email: [EMAIL PROTECTED]
HCDT Project Officer Tel: +44 (0)1865 273 290
Humanities Computing Development Team
Humanities Computing Unit
Oxford University Computing Services
13 Banbury Road
Oxford, England. OX2 6NN
Web: http://www.oucs.ox.ac.uk/hcdt/staff.html#paul
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~