logo       

RE: SPAN CLASS ID, ID stripped: msg#00028

java.enhydra.xmlc

Subject: RE: SPAN CLASS ID, ID stripped

Hi Petr,
What Jacob says is correct... However you may be unintentionally removing
it (that is XMLC may be).

The OutputOptions class has a method setDropHtmlSpanIds(boolean). If this
is set to true then they will be stripped.

Note if you are using the HTMLFormatter.toDocument(HTMLDocument) method or
use HTMLFormatter.getDefaultOutputOptions() span id stripping is set on by
default.

The comment says it was put in to work around an issue with IE 4, which
shouldn't be relevent to much of anyone these days.

Regards,
Steve Mayhew


> -----Original Message-----
> From: Jacob Kjome [mailto:hoju@xxxxxxxx]
> Sent: Tuesday, December 17, 2002 8:46 AM
> To: Petr Stehlik
> Subject: Re: Xmlc: SPAN CLASS ID, ID stripped
>
>
> Hello Petr,
>
> It shouldn't be removed unless you removed the id programmatically.
> Either way, if you want to style this element, you can provide another
> class to do that. Did you know that multiple classes can be applied
> to an element? You just space-separate the class names such as...
>
> <span class="areaheader middle" id="middle">WELCOME!</span>
>
> BTW, just a note. I assume that the id name "middle" has a meaning of
> how the element is supposed to be stylistically positioned. You
> should avoid naming id's and classes in a way that hints at how you
> currently want elements correlated with them to be styled. Your class
> name "areaheader" is a good one because it says what it is and doesn't
> hint at how it should be styled.
>
> Hope that helps.
>
> Jake
>
> Tuesday, December 17, 2002, 7:00:18 AM, you wrote:
>
> PS> Hi,
>
> PS> I got a piece of HTML looking as follows:
>
> PS> <span class="areaheader" id="middle">WELCOME!</span>
>
> PS> Both the class and the id are important for CSS
> formatting. However,
> PS> XMLC generated HTML does not contain the "id=middle" so
> the formatting
> PS> is incorrect.
>
> PS> Any idea why XMLC strips out the "id" from "<span>"? Any
> way how to
> PS> preserve the "id" there? Or a workaround for this problem?
>
> PS> I am using Enhydra 5.0+, SUN JDK 1.4.1, JBuilder 7.
>
> PS> Petr
>
>
> PS> _______________________________________________
> PS> XMLC mailing list
> PS> XMLC@xxxxxxxxxxx
> PS> http://www.enhydra.org/mailman/listinfo.cgi/xmlc
>
>
>
> --
> Best regards,
> Jacob mailto:hoju@xxxxxxxx
>
> _______________________________________________
> XMLC mailing list
> XMLC@xxxxxxxxxxx
> http://www.enhydra.org/mailman/listinfo.cgi/xmlc
>


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise