xsl-list
[Top] [All Lists]

Re: How to prevent that XML attributes ares automatically added ?

2006-02-22 11:54:33
On 2/22/06, Jérôme Haguet <j(_dot_)haguet(_at_)cadwin(_dot_)com> wrote:
Hello

I am doing some changes in (a lot of) XML documents with XSL (using Apache 
Ant 1.6.5 target named <xslt .../>)
The -simple - purpose is to delete / add  / modify some attributes.

Basically, it works.

Except one thing : in some cases, it adds some attributes to some XML 
elements.
I guess that this happens in order that the final XML become compliant with 
the DTD specified in the top of the source XML file.
If I delete the DTD directive, no attributes are added.

Here above is an example of the added attributes :

<!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" 
"http://jasperreports.sourceforge.net/dtds/jasperreport.dtd";>
<jasperReport ...isFloatColumnFooter="false" whenResourceMissingType="Null" 
isIgnorePagination="false">
...
</jasperReport>

The point is that I do not want these attributes to be added - for the moment.
Any idea how to unactivate this ?

You need to alter the DTD to remove the defaulted attributes, or alter
the source XML to remove the doctype so the XML doesn't get validated.

cheers
andrew

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>