[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: "Karjala Koponen" <kkoponen@xxxxxxxxxxxxxxxx>
Date: Fri, 28 Jan 2005 09:55:53 -0500

David,

Thanks, comments embedded.

Karjala

>>> davidc@xxxxxxxxx 01/28/2005 9:31:39 AM >>>

   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>


...

  But then I get the namespace attribute in the output file:

  ...
  <serial-issue xmlns:ce=" http://www.elsevier.com/xml/common/dtd ">
  ...
  </serial-issue>

This usage is valid according to the DTD (isn't it?) Why is this form a
problem?

KK: My goal was to match what I thought was the correct document.  I have
asked for a real sample from the customer directly but have not received one,
yet.  I do not know that the form would be a problem.  Our submissions for
approval by the customer consist of a large package of files.  I have been
reluctant to contribute a file that doesn't match and have it cause a
rejection of the whole package.  Clearly, I should make a separate query,
especially as my suspicion grows that the model I've used was generated using
tools other than xslt.



If you do generate a file of the form you want (which is quite hard with
XSLT) then the resulting file will not work with microsoft parsers.
...

KK: I happened to open the files with IE but the ability to be parsed by IE is
not important.

David

KK:  Thanks for your help,

Karjala


Current Thread
Keywords
xml