octave-maintainers
[Top][All Lists]
Advanced

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

Re: C++ version of regexprep.cc


From: Andy Adler
Subject: Re: C++ version of regexprep.cc
Date: Thu, 4 May 2006 12:50:04 -0400 (EDT)

On Thu, 4 May 2006, Bill Denney wrote:

> On Thu, 4 May 2006, Andy Adler wrote:
>
> > Note that this is a very non standard way to parse XML.
> >
> > The colon is a name space designator. Consider thse documents
> >
> >    <doc xmlns:ABC="http://my.xml.name.space";>
> >      <ABC:de value="1"/>
> >    </doc>
> >
> > and
> >
> >    <doc xmlns:XYZ="http://my.xml.name.space";>
> >      <XYZ:de value="1"/>
> >    </doc>
> >
> > The XML infoset spec requires that these documents be
> > considered to be EXACTLY equivalent.  This means that
> > any XML processing application which treats these
> > documents differently is techically NOT VALID.
> >
> > Do we want octave XML parsers to correctly deal with
> > these kinds of issues.
>
> I personally think that elements should have a namespace associated
> with it only if it's different than the parent.  Then it is simple to
> climb the tree to see your particular namespace.


That is a good idea. However, I'm not sure if this matches
the XML spec. XML namespaces provide a default namespace
for the document for all unspecified tags, not for those
that differ from the parent (correct me if I'm wrong).

My issue is that it is easy to write all sorts of ad-hoc
XML "parsers" that solve one particular problem but are
not any good for general XML parsing.

The problem is that this is guaranteed to cause a big
maintenance headache when people use it more generally.

--
Andy Adler <address@hidden> 1(613)562-5800x6218


reply via email to

[Prev in Thread] Current Thread [Next in Thread]