I think it depends on what components you have in your pipeline. There's a
component somewhere that will manufacture a prefix for the attribute, but
it's probably possible to assemble a pipeline in which that component is
absent. My usual rule of thumb is that sorting out namespace constistency is
the task of the NamespaceReducer component.
(I'm making guesses here about the nature of the application as being some
kind of pipeline assembled from Saxon components.)
> -----Original Message-----
> From: Norman Walsh [mailto:ndw@...]
> Sent: 14 February 2010 21:05
> To: saxon-help@...
> Subject: [saxon] Attribute in an explicit namespace
> If I construct a QName w/o a prefix:
> QName aname = new QName("http://example.com/", "name")
> and use that as the name of an attribute, when Saxon
> serializes the result, it appears not to manufacture a prefix
> for the attribute.
> Is that what you'd expect, or is it likely that I'm doing
> something wrong in either the creation of the attribute or in
> the call to the serializer?
> (If the answer isn't obvious, I'll construct a proper test
> case and send it in, just let me know.)
> Be seeing you,
> Norman Walsh <ndw@...> | Correct me if I'm wrong, but
> hasn't the
> http://nwalsh.com/ | fine line between sanity and madness
> | gotten finer?--George Price