OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Namespace URIs for extension functions [was: xml:base and DocBook stylesheets]


Mauritz Jeanson <mj@johanneberg.com>, 2006-10-06 17:46 +0200:

> The "http://"; part is ignored, apparently. Both
> "org.apache.xalan.lib.NodeInfo" and "http://org.apache.xalan.lib.NodeInfo";
> can be used (even "xyz://org.apache.xalan.lib.NodeInfo" works). 

The Saxon docs[1] indicate that to Saxon, "the part of the URI
before the final '/' is immaterial".

  [1]http://www.saxonica.com/documentation/extensibility/functions.html);

The Xalan docs[2] say Xalan will "simply use the string to the
right of the rightmost forward slash as the Java class name".

  [2]http://xml.apache.org/xalan-j/extensions.html#java-namespace-declare);

Saxon also supports using "java:" as a prefix (for example,
java:com.isogen.saxoni18n.Saxoni18nService), but based on some
problems I've run into with how xmllint handles URIs of that form
and unprefixed ones, I think it's safest to always include a
prefix in the form "foo://".

The canonicalizer in xmllint basically considers URIs without a
prefix of that form to be "relative namespace URIs", so an attempt
to canonicalize a doc instance that contains a URI without a
prefix of that form will fail.

I suppose there are some other XML processing applications that
handle that type of URI in the same way, and the reason that Saxon
and Xalan both support having any arbitrary "foo://" prefix is
just for sake of enabling stylesheet authors to make their
stylesheets usable in tools that expect that form.

As far as the specific xmllint behavior for this case, I guess it
could be argued (or maybe already has been) that it's a bug. But
since that's the current state of things, I think it's safest to
always use the "foo://"-prefixed form for extension-function
namespace URIs.

  --Mike

smime.p7s



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]