Preventing DTD default attributes in output
Added by Anonymous over 15 years ago
Legacy ID: #7392985 Legacy Poster: Cameron McCormack (heycam)
Hi. I am using Saxon-B 9.0.0.4 and I want to prevent default attributes from a DTD from appearing in my output document. I thought the -expand:off command line argument would do that, but it doesn't seem to help. zot:/tmp $ cat a.dtd <!ATTLIST a b CDATA "c"> zot:/tmp $ cat a.xml <!DOCTYPE a SYSTEM "a.dtd"> <a/> zot:/tmp $ cat a.xsl <stylesheet xmlns="http://www.w3.org/1999/XSL/Transform" version="2.0"> <template match='/'> <copy-of select='*'/> </template> </stylesheet> zot:/tmp $ saxonb-xslt -dtd:off -expand:off a.xml /tmp/a.xsl <?xml version="1.0" encoding="UTF-8"?><a b="c"/> How can I prevent the b="c" attribute from appearing in the output? Thanks, Cameron
Replies (2)
RE: Preventing DTD default attributes in output - Added by Anonymous over 15 years ago
Legacy ID: #7393207 Legacy Poster: Michael Kay (mhkay)
This example works as expected under Saxon 9.1.0.6. If memory serves me right, the -expand option in 9.0 applied only to schema-defined attribute defaults.
RE: Preventing DTD default attributes in output - Added by Anonymous over 15 years ago
Legacy ID: #7394687 Legacy Poster: Cameron McCormack (heycam)
Thanks Michael, updating to 9.1.0.6 does the trick!
Please register to reply