Re: [cssom] serializing Selectors

On Tue, 20 Oct 2009, Anne van Kesteren wrote:

>> removing them from rules collection making cssom inconsistent/inadequate.
>> the same if changes not affect namespace map (subsequent rule insertion
>> broken).
>
> I don't follow.

in compound document where info pieces came from different sources,
you cannot guarantee success of Sheet.insertRule(X) unless:
- namespace prefixes used in X known
- namespace prefixes used in Sheet known (can be examined thru api)
and/or
- namespace prefix conflicts between X and Sheet can be solved
since X is string and cannot be decomposed to prefixes w/o parsing, the 
only way to solve known prefix conflict is direct manipulation with 
@namespace rules collection in Sheet (add/replace).

>> too high price for 'perfect serialization'. i prefer non-serializable impl:
>> - changes in @namespace rules mirrored to namespace map in sheet's
>>   context immediately;
>> - such map used only during parse;
>> - any subsequent parser invocation use current state of map.
>
> This seems a lot worse.

better than nothing.

>
>
>

Received on Wednesday, 21 October 2009 10:36:04 UTC