After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 618566 - Support --loaddtd and --dtdattr on xsltproc
Support --loaddtd and --dtdattr on xsltproc
Status: RESOLVED INVALID
Product: libxslt
Classification: Platform
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2010-05-13 19:26 UTC by Shaun McCance
Modified: 2012-09-04 12:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Support --loaddtd and --dtdattr on xsltproc (1.47 KB, patch)
2010-05-13 19:26 UTC, Shaun McCance
none Details | Review

Description Shaun McCance 2010-05-13 19:26:09 UTC
Created attachment 160998 [details] [review]
Support --loaddtd and --dtdattr on xsltproc

Processing DITA correctly requires loading the DTD and applying the default attributes. It's not enough to just do it with xmllint and pipe the result through xsltproc, because DITA's conref feature requires loading extra files using the XPath document function. Attaching a patch. I lifted this straight from xmllint.c.
Comment 1 Daniel Veillard 2012-09-04 12:33:04 UTC
That sounds a bit weird because XPath data model explicitely requires
loading the DTD and expanding default attributes...

in xsltproc.c 

static int options = XSLT_PARSE_OPTIONS;

and in libxslt/xslt.h

/**
 * XSLT_PARSE_OPTIONS:
 *
 * The set of options to pass to an xmlReadxxx when loading files for
 * XSLT consumption.
 */
#define XSLT_PARSE_OPTIONS \
 XML_PARSE_NOENT | XML_PARSE_DTDLOAD | XML_PARSE_DTDATTR | XML_PARSE_NOCDATA

So basically enabling those options should be a no-op, so i'm not tempted to
pick that patch which may induce confusion rather than help.
Or did I misunderstood something ? Please reopen if I did :-)

Daniel
Comment 2 Daniel Veillard 2012-09-04 12:33:57 UTC
err ... *not* pick that patch, sorry

Daniel