[XSL-LIST Mailing List Archive Home]
RE: [xsl] A colon is not allowed in the name
Subject: RE: [xsl] A colon is not allowed in the name|
From: "SINGH Navpreet" <navpreet.singh@xxxxxxxxxxxxxx>
Date: Wed, 25 Mar 2009 17:06:29 +1100
Thanks for your reply.
I am using usual namespaces in xsl file not in xml file as follows
I am creating javax.xml.transform.Source object for xml file and pass it
to transform method of javax.xml.transform.Transformer.
I've written a java class that uses org.apache.fop.apps.Fop to convert
xml to PDF using xsl file.
From: Deborah Pickett [mailto:debbiep-list-xsl@xxxxxxxxxx]
Sent: Wednesday, 25 March 2009 4:47 PM
Subject: Re: [xsl] A colon is not allowed in the name
You haven't said whether this document:
> <header type="new">
> <?QM: GENERATOR [Ref] 10055: ParaHeading: NEW?>Generate New
uses namespaces anywhere, nor how you are reading it in, nor what you
using to process it. This matters, because:
> ERROR: 'A colon is not allowed in the name 'QM:' when namespaces are
is a rule that comes straight from the Namespaces-in-XML spec:
QUOTE: in a namespace-well-formed document [...] No entity names,
processing instruction targets, or notation names contain any colons.
You can only avoid that restriction by (a) having whoever produced that
processing instruction stop using a colon (which you have said is
your power), or (b) strictly avoiding the use of namespaces in the
document. Doing (b) may require you to remind the XML parser that it is
parsing a non-namespaced document (see
for one such mechanism).
As an aside, you can get away with (b) only because the XML spec
reluctantly permits colons in names, though the spec pretty much
the intelligence of anyone who does it:
QUOTE: The Namespaces in XML Recommendation [XML Names] assigns a
to names containing colon characters. Therefore, authors should not use
the colon in XML names except for namespace purposes
You should show that to the person who stopped you from pursuing option
The contents of this e-mail including any attachments are intended only
for the person or entity to which this e-mail is addressed. If you are not,
or believe you may not be, the intended recipient, please advise the sender
immediately by return e-mail, delete this e-mail and destroy any copies.
The Company does not warrant nor guarantee that this email communication is
from errors, virus, interception or interference.