Help SGML / XML

Ruan Strydom ruan at jcell.co.za
Fri Apr 30 18:19:38 UTC 2010


I have to apologize (feel like an idiot), I have not touched kdevelop (or my 
own code) in over a month, the answer to all my questions is these are 
instances. And my builders already declares them as that. So that just leaves 
3.

Thanks.


On Wednesday 28 April 2010 23:15:22 Ruan Strydom wrote:
> Me again...
> 
> Still confused, I read through the source but time is limited, a little
>  help will speed up understanding the source, thanks.
> 
> I am struggling to understanding the duchain and builders (I hope these
>  make sense):
> 
> 1. How does the 'use' builder come into play? Surely html/body/link etc is
>  an use of the declared element in the DTD? Should I still create a context
>  / declarations for the elements then, does it not conflict with the use?
>  Or do I  create both context/declarations and uses for the same element?
>  Continues at 5 bellow...
> 
> 2. Should I run the include builder first? The included doctype defines the
>  SGML? And I need to find them in the duchain while parsing the sgml. ie:
>  when the tokenizer hits an element named 'body' -> find the declaration in
>  the duchain (previously parsed dtd) determine if its closing, required,
>  empty etc, and carry on. (at the moment I am just using a helper class for
>  this)
> 
> 3. I have an element as a ClassDeclaration (subclassed as
>  'ElementDeclaration') I want to add a member (collection or hash of
>  attributes) to the class.  How do I get the duchain to serialize and
>  de-serialize the collection or hash? (perhaps someone can help me with the
>  mapping to the relevant duchain classes ie: element -> class, allowed
>  children -> ?, namespace -> ? etc)
> 
> 4. XSD.. I will leave this for another mail at a later stage ;)
> 
> 5: Sample duchain dump from the current context and declaration builders (I
>  don't have a use/include builders yet as I have not implemented DTD/XSD
>  completely yet): (sample from www.yahoo.com). Will the 'use' builder tie
>  these still to the DTD?
> 
> 
> "DOCTYPE"
> "html"
> "html::head"
> "html::head::meta"
> "html::head::title"
> "html::head::title::TEXT"
> "html::head::meta"
> "html::head::meta"
> "html::head::script"
> "html::head::script::TEXT"
> "html::head::link"
> "html::head::style"
> "html::head::style::TEXT"
> "html::head::style"
> "html::head::style::TEXT"
> "html::body"
> "html::body::div"
> "html::body::div::div"
> "html::body::div::div::div"
> "html::body::div::div::div"
> "html::body::div"
> "html::body::div::div"
> "html::body::div::div::div"
> "html::body::div::div::div::div"
> "html::body::div::div::div::div::div"
> "html::body::div::div::div::div::div::div"
> "html::body::div::div::div::div::div::div::div"
> "html::body::div::div::div::div::div::div::div::div"
> "html::body::div::div::div::div::div::div::div::div::h1"
> "html::body::div::div::div::div::div::div::div::div::h1::div"
> "html::body::div::div::div::div::div::div::div::div::h1::div::span"
> "html::body::div::div::div::div::div::div::div::div::h1::div::span::TEXT"
> "html::body::div::div::div::div::div::div::div::div::h1::div"
> "html::body::div::div::div::div::div::div::div::div::h1::div::img"
> "html::body::div::div::div::div::div::div::div::div::h1::div"
> "html::body::div::div::div::div::div::div::div::div::script"
> "html::body::div::div::div::div::div::div::div::div::script::TEXT"
> "html::body::div::div::div::div::div::div::div::div::script"
> "html::body::div::div::div::div::div::div::div::div::script::TEXT"
> "html::body::div::div::div::div::div::div::div::div::script"
> "html::body::div::div::div::div::div::div::div::div::script::TEXT"
> "html::body::div::div::div::div::div::div::div::div::noscript"
> "html::body::div::div::div::div::div::div::div::div::noscript::img"
> "html::body::div::div::div::div::div::div::div"
> "html::body::div::div::div::div::form"
> "html::body::div::div::div::div::form::fieldset"
> "html::body::div::div::div::div::form::fieldset::legend"
> "html::body::div::div::div::div::form::fieldset::legend::TEXT"
> "html::body::div::div::div::div::form::fieldset::ul"
> "html::body::div::div::div::div::form::fieldset::ul::li"
> "html::body::div::div::div::div::form::fieldset::ul::li::a"
> 




More information about the KDevelop-devel mailing list