Re: HTMLWriter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Roman,
One more question, do you have any idea what isBlockTag() is for? Although
I have implemented this method, I am not sure where it is supposed to be
used. Thanks!
                                                                 David Fu.

> Hi Fu.,
>
> Am Dienstag, den 17.10.2006, 22:15 +0900 schrieb fchoong@xxxxxxxxxxx:
>> Hi Roman,
>> Thanks! That makes it much clearer! But I Still do not understand what
>> is
>> meant by "Unwanted" in the closeOutUnwantedEmbeddedTags()... :(
>
> Well. The API docs for writeEmbeddedTags() says:
>
> <<Searches for embedded tags in the AttributeSet and writes them out. It
> also stores these tags in a vector so that when appropriate the
> corresponding end tags can be written out.>>
>
> Then, the API docs for closeOutUnwantedEmbeddedTags() says the
> following:
> <<Searches the attribute set and for each tag that is stored in the tag
> vector. If the tag isnt found, then the tag is removed from the vector
> and a corresponding end tag is written out.>>
>
> This means to me that writeEmbeddedtag() writes the opening tags for the
> embedded tags in the AttributeSet and stores them in a datastructure
> (they say vector, but I suppose its better to use an HashSet since this
> is not public, and HashSet seems much more efficient here). Actually, in
> my understanding, we should only write an opening tag for an embedded
> tag that is in the AttributeSet, but not yet in the datastructure.
>
> Now, for the following tags the closeOutUnwantedEmbeddedTags() does the
> opposite: For each tag in the vector that is _not_ in the AttributeSet,
> it writes out the end tag (because for an embedded tag not present in
> the AttributeSet it means it must be closed).
>
> I hope that this helps. (And also note that this is only my
> interpretation of the specs in the light of the underlying modeling of
> HTML).
>
> Cheers, Roman
>
>
>



[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux