xml namespaces and xsd's
ruan at jcell.co.za
Fri Jun 11 20:06:19 UTC 2010
Hi Milian, my apologies, my eyes must have deceived me. (I've added your name
to my dictionary)
You see the reason why I am struggling with this is:
The xml is a tree, a bunch of declaration instances and context's, the XSD
defines this but is also XML ie: while I am editing the XSD I need it to be
parsed as plain XML but when it is included it needs to be parsed as a Schema
similar to DTD.
this declares an instance of 'complexType' but also declares a type 'blah'
creating a conflict. When searching the chain at a certain position which one
do I return? Both is at the same location, both have the same range for their
ps: Anyone watching the soccer, I can not help but to ask as I can hear the
'vuvuzelas' in the streets/neighborhood, as I stay in SA.
On Friday 11 June 2010 21:39:20 Milian Wolff wrote:
> Ruan Strydom, 11.06.2010:
> > Hi, sorry I know the mail is a bit long....
> > Problem 1: (XSD)
> > The parser and builders works pretty well, but to be able to add
> > completion to XML I have to implement XSD. The problem is that if I am
> > going to build declarations and context's for the XSD document I will
> > loose the pretty tree structure that is currently built.
> > I have thought of two options:
> > 1) Parse the XSD into a separate structure for completion (perhaps using
> > an existing api) ie SchemaCompletionHelper or something?
> > 2) When Millian has made his changes to support multiple top context's I
> > can create a special top context 'sub document' for XSD schemas?
> > Millian: would option 2 be possible with your changes?
> Meh, I'm written with a single 'l' :P
> Anyhow, can't you use nested contexts to emulate a tree?
> > DTD is a bit of a mess still, it works but not great if it becomes a
> > problem I would need to either find a way t fix it or switch to option 1
> > for it.
> > Problem 2: (Namespaces)
> > How does one declare the following: Ns::SomeClass? I have created
> > namespace declarations and namespace aliases and imports ie xmlns::ord=
> > "http://..../orders.xsd" (not committed yet) but when using it what is
> > this called? What kind of
> > declaration is the namespace part in Ns::SomeClass or <ord:order .. > how
> > does cpp do it? (could not find it)
> You need contexts. I've just added preliminary namespace support to PHP,
> maybe that helps you?
> > Supporting namespace's in XML without proper schema language support is
> > going to be a bit of a hack but I am hoping to get some value from
> > hacking it, the imports (declarations not contexts) and namespaces will
> > be in the chain, so on completion it can be used to find the schema to
> > complete with, if using method 1. Else using method 2 the uses and
> > imported contexts will simply point to it, if the change of Millian will
> > allow cross 'sub document' imports.
> Could you explain that a bit more? What would be the two documents? Do they
> actually have different "languages"? Or is it simply two XML chains? The
> latter works even now...
> > Thanks allot
> :P ;-)
> > ps: Where do you guys find the time?
> being student helps a lot :P
More information about the KDevelop-devel