[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] namespace reference in xsl without being attribute in outputxml


Subject: RE: [xsl] namespace reference in xsl without being attribute in outputxml
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 28 Jan 2005 15:15:08 -0000

> I want to generate an xml file, with namespace references, like: 
> 
> <?xml version="1.0" encoding="UTF-8"?> 
> <!DOCTYPE serial-issue PUBLIC "-//ES//DTD serials issue DTD 
> version 5.1.0//EN//XML" "si510.dtd"> 
> <serial-issue> 
> <issue-info> 
> <ce:pii>S9999-9994(04)X0057-X</ce:pii> 
> ... 
> </issue-info> 
> ... 
> </serial-issue> 

You mean, you want to generate XML that isn't namespace-well-formed (because
it contains undeclared prefixes)?

XSLT can't do that. 

Try generating the element names as <ce_pii> and then modifying the
serialized result with some language (e.g. Perl) that doesn't know it's
dealing with XML.

Michael Kay
http://www.saxonica.com/


Current Thread
Keywords