logo       

Re: [xmlc] <br clear="none"></br>: msg#00005

java.enhydra.xmlc

Subject: Re: [xmlc] <br clear="none"></br>


I don't have time to check ATM, because I'm at work. However, can you look at
the DTD? Does it have default values defined for these attributes? If so, the
parser is probably filling those in automagically. Not sure what could be done
about that other than changing the DTD (which is feasible, since XMLC contains
its own local copies of the DTD, but care would need to be taken for any change
to a published DTD) or having the user delete the attribute (which would be
annoying, I admit).

As far as outputing <br ...></br> instead of <br .../>, that's probably
something I can control in the serializer code. I'll try to look into it
tonight. There's no reason it should be output with the former format as BR's
content model is empty, at least as far as I am aware.


Jake

Quoting Erik Rasmussen <rasmussenerik@xxxxxxxxx>:

> Greetings list subscribers. I'm having a problem with how XMLC (2.3-
> beta3) is rendering my documents. For every <br/> tag in my input
> document, I'm getting <br clear="none"></br> in my outputted
> document. This wouldn't be a problem, except that every web
> developer's favorite browser, Internet Explorer, isn't rendering it
> the same as a <br/> tag.
>
> I'm outputting the document using a org.enhydra.xml.io.DOMFormatter
> with the following OutputOptions object:
> ----
> XHTML = new OutputOptions();
> XHTML.setEnableXHTMLCompatibility(true);
> XHTML.setUseAposEntity(false);
> XHTML.setOmitXMLHeader(true);
> XHTML.setMIMEType("text/html");
> ----
> I've tried flipping just about every flag on the OutputOptions, but
> with no change in <br/> behavior.
>
> The relevant section of my options.xmlc looks like this:
> ----
> <inputDocument processSSI="true" documentFormat="xml"/>
> <documentClass createGetTagMethods="true"
> suppressGetElementMethods="true"
> deferParsing="true"
> dom="xhtml"/>
> <parser name="xerces"/>
> ----
>
> If I debug, I can see that the actual HTMLBRElement implementation is
> a org.enhydra.xml.xhtml.dom.xerces.XHTMLBRElementImpl, and it really
> does have one attribute node (clear="none").
>
> So it seems like it's a parsing problem rather than a formatting
> problem. I've debugged all the way into XercesDOMParser's call to
> super.parse(). I don't have the source to where it goes from there,
> but when it gets back from the parse() call, the document already has
> the <br clear="none"/> tags in it. A breakpoint in
> XHTMLBRElementImpl.setClear() never gets hit, so, as one would
> expect, it's getting set with the more generic setAttribute() method.
>
> I had no idea that there was even a "clear" attribute available on a
> <br/> tag. So, I guess my questions are: Has anyone else seen this
> behavior? Is there an obvious setting for me to change to stop it?
>
> Thanks,
> Erik
>
> P.S. I'm also getting shape="rect" attributes on all my <a> tags for
> no particular reason. It doesn't bother me too much yet, because it
> doesn't seem to affect page rendering.
>
>





--
You receive this message as a subscriber of the xmlc@xxxxxxxxxxxxx mailing list.
To unsubscribe: mailto:xmlc-unsubscribe@xxxxxxxxxxxxx
For general help: mailto:sympa@xxxxxxxxxxxxx?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise