Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: SVG DOM

From: "Adam Badura" <abadura@--.-->
To: NULL
Date: 9/30/2009 8:51:00 PM
> It seems the intended way to reuse LINQ to XML classes is the annotation 
> feature:
> http://blogs.msdn.com/mikechampion/archive/2006/08/17/705278.aspx

    This seems fine enough. And possibility to "inject methods" through 
extensions seems very helpful as well (an example shown in 
http://blogs.msdn.com/mikechampion/archive/2006/09/10/748408.aspx).
    However after few small code experiments I came to a conclusion that it 
might not be enough. I considered adding classes with SVG DOM-like 
properties as annotations to the XElements. An example is the base IDL 
SVGElement which contains attributes "id" and "xmlbase" (referring to "id" 
element attribute and "xml:base" element attribute). I changed it to an 
SvgElement class with Id and XmlBase properties. But then natural question 
occurs: should those be get only or get/set? In the IDL's SVGElement they 
are get/set (with some restrictions).  If I was to support the setting how 
would I do that? I considered constructing my SvgElement with XElement (to 
which it referrers) given during construction and not only reading 
appropriate data but also storing the XElement to be able latter to set the 
data in setters.
    All fine but what if the user copies XElement? The annotation is not 
copied. (And even if I would find a way to copy it it would still be 
incorrect as internal XElement reference would be to the original XElement.) 
Also if user adds a new XElement to the tree I have very poor means to 
detect it to be able to add appropriate annotation.
    Do you have any suggestions to work around this?

    Adam Badura 



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent