[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 16:32:20 -0400 (EDT) |
On Thu, 4 May 2006, Bill Denney wrote:
> On Thu, 4 May 2006, Andy Adler wrote:
>
> > On Thu, 4 May 2006, Bill Denney wrote:
> >
> >> 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).
>
> I don't think that's the case. The general format of a document is that
> you can change the default namespace or use a specific namespace for a
> specific element.
>
> For example:
>
> <doc xmlns="http://my.namespace/uri" xmlns:his="http://his.namespace/uri">
> <mine xmlns="http://other.namespace/uri">
> <data/>
> </mine>
> <yours>
> <data/>
> </yours>
> <his:data/>
> </doc>
>
> The <data/> that is within mine falls into the namespace
> "http://other.namespace/uri" because the default namespace was changed for
> all sub-elements under <mine>. The <data/> under yours falls into the
> namespace "http://my.namespace/uri", and the his: in <his:data> indicates
> that that data element falls into the namespace
> "http://his.namespace/uri". So the default namespace can be changed
> for the tree under any leaf.
Thanks for the clarification.
The basic issue is that if we do XML, we can't just do some ad-hoc
thing. We need to design a good API that does XML correctly.
One consequence, in my opinion, is that the Octave representation
of a loaded XML file must be the same for all xml-info-set
equivalent documents.
--
Andy Adler <address@hidden> 1(613)562-5800x6218
- Re: C++ version of regexprep.cc, (continued)
- Re: C++ version of regexprep.cc, Paul Kienzle, 2006/05/02
- Re: C++ version of regexprep.cc, David Bateman, 2006/05/03
- Re: C++ version of regexprep.cc, Paul Kienzle, 2006/05/03
- Re: C++ version of regexprep.cc, David Bateman, 2006/05/04
- Re: C++ version of regexprep.cc, Alois Schloegl, 2006/05/04
- Re: C++ version of regexprep.cc, David Bateman, 2006/05/04
- Re: C++ version of regexprep.cc, Andy Adler, 2006/05/04
- Re: C++ version of regexprep.cc, Bill Denney, 2006/05/04
- Re: C++ version of regexprep.cc, Andy Adler, 2006/05/04
- Re: C++ version of regexprep.cc, Bill Denney, 2006/05/04
- Re: C++ version of regexprep.cc,
Andy Adler <=
- Re: C++ version of regexprep.cc, Paul Kienzle, 2006/05/02
- Re: C++ version of regexprep.cc, David Bateman, 2006/05/02
- Re: C++ version of regexprep.cc, Paul Kienzle, 2006/05/02