xml namespaces and xsd's

Milian Wolff mail at milianw.de
Fri Jun 11 19:39:20 UTC 2010


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

http://hyperboleandahalf.blogspot.com/2010/04/alot-is-better-than-you-at-
everything.html

:P ;-)

> 
> ps: Where do you guys find the time?

being student helps a lot :P
-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20100611/4c7260f6/attachment.sig>


More information about the KDevelop-devel mailing list