logo       

[ tidy-Feature Requests-1067539 ] quote-ampersand flag being ignored (xml m: msg#00064

web.html-tidy.tracker

Subject: [ tidy-Feature Requests-1067539 ] quote-ampersand flag being ignored (xml mode)

Feature Requests item #1067539, was opened at 2004-11-16 19:18
Message generated for change (Settings changed) made by hoehrmann
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=390966&aid=1067539&group_id=27659

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 5
Submitted By: Peter Cooner (petri)
Assigned to: Nobody/Anonymous (nobody)
Summary: quote-ampersand flag being ignored (xml mode)

Initial Comment:
It seems to me that tidy is ignoring the
quote-ampersand flag from both config and command line.

The config:
input-xml: yes
output-xml: yes
indent: auto
indent-spaces: 4
quote-ampersand: no
wrap: 0
new-pre-tags: literallayout, programlisting,
programlistingco, screen, screenco, screenshot
//--- end ---

Tidy versions tried:
HTML Tidy for Mac OS X released on 1st December 2002
(from Fink)
HTML Tidy for Mac OS X released on 1st July 2004 (from
homepage)

Any help would be much appreciated.



----------------------------------------------------------------------

Comment By: Björn Höhrmann (hoehrmann)
Date: 2004-11-17 23:34

Message:
Logged In: YES
user_id=188003

This is basically by design and I'd rather not touch the
relevant code. A proper fix would introduce entity nodes as
we discussed long ago on tidy-devel. We could special-case
pure XML input + output (as opposed to XHTML) but that does
not really add much as the XML mode is quite broken as it
stands. So I think this would be better as a feature
request.

You can change config.c:AdjustConfig(...) commenting the
line with TidyQuoteAmpersand out and re-compile for a
possible ad-hoc fix.

----------------------------------------------------------------------

Comment By: Peter Cooner (petri)
Date: 2004-11-17 22:12

Message:
Logged In: YES
user_id=16223

Yes of course. Keep in mind that I'm using docbook xml files
here, which have their own complex DTD file which I'm sure
tidy is just ignoring, and thats just fine by me.

The problem seems to be that docbook introduces their own
ampersand entities such as ® and &ch01;

These are being hosed by tidy :(

The option which seems to be doing this is the
quote-ampersand flag. According to the documentation, "This
option specifies if Tidy should output unadorned &
characters as &."

Because tidy doesn't consider these add-on ampersand
entities as valid, they are then unadorned & characters
which then get turned into &

So for example:
&frontm;
&ch01;
&ch02;

Gets turned into:
&frontm; &ch01; &ch02;

And tidy spits out the warning:
line 27 column 1 - Warning: unescaped & or unknown entity
"&frontm"
line 28 column 1 - Warning: unescaped & or unknown entity
"&ch01"
line 29 column 1 - Warning: unescaped & or unknown entity
"&ch02"

I've attached smallest XML file which this happens in, but
it happens in many places throughout the docbook. Of course
tidy doesn't have much to do in this file, but its just an
example.

----------------------------------------------------------------------

Comment By: Arnaud Desitter (arnaud02)
Date: 2004-11-17 17:46

Message:
Logged In: YES
user_id=566665

Please post a minimal test case, minimal set of options for tidy
and explain why the results is not what you are expecting.


----------------------------------------------------------------------

Comment By: Peter Cooner (petri)
Date: 2004-11-17 17:01

Message:
Logged In: YES
user_id=16223

Note that I've now built this direct from CVS, and it gives
the same behavor.

Versions tried:
HTML Tidy for Mac OS X released on 1st September 2004 (CVSed
Nov 16th)

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=390966&aid=1067539&group_id=27659


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf


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

News | FAQ | advertise