[dsdl-discuss] Re: Namespace renaming

From: G. Ken Holman <gkholman@CraneSoftwrights.com>
Date: Thu Dec 08 2005 - 00:17:22 UTC

At 2005-12-07 19:31 +0000, you wrote:
>Again Ken, many thanks for your comprehensive response.

I'm sorry I don't get more time to participate at this depth. And
I'm sorry I'm making you type so much when your arm is not
well! BTW, you will probably lose my participation next week because
my hospital visits begin on Monday morning.

>You mentioned in a couple of places that you couldn't see the scenario for
>needing to switch namespace prefixes. Let me give you one, which is a
>practical problem that I am working on at present.
>...
>The schema for the restricted set of tags has its own namespace, e.g.
>xia.

That's a prefix, not a namespace.

>However, what I need to do is to transform my xia:section elements as
>html:div before online delivery

Online delivery doesn't care what the prefix is, it only cares what the URI is.

You don't say if your xia prefix is mapped to your own
namespace. Let's consider the two answers to this question:

(1) - source: <xia:div xmlns:xia="urn:x-martin:stuff">
       target: <xhtml:div xmlns:xhtml="http://www.w3.org/TR/REC-html40">
     - in this case you aren't just renaming the prefix you are
renaming the entire element

(2) - source: <xia:div xmlns:xia="http://www.w3.org/TR/REC-html40">
       target: <xhtml:div xmlns:xhtml="http://www.w3.org/TR/REC-html40">
     - in this case the online system shouldn't care what the prefix
is and should just as well support <xia:div> as an HTML construct

If, however, the online system isn't namespace URI aware and is keyed
on the prefix, then that's another story. If the system isn't XML
compliant and we need DSRL to accommodate non-XML systems, then my
arguments don't apply.

>I can
>do all this with XSLT, but it would be nice if I could generate this XSLT
>automatically from a simple mapping definition such as DSRL instead of
>expecting my doc specialist customers to be fully conversant with XSLT.

Absolutely! Which is why I'm anxious to see a DSRL.

>Hence my lack of concern when WG1 suggested that we should allow prefix
>renaming as part of the functionality of DSRL.

>My real problem is that we have a scenario that has:
>
>Source Schema --> DSRL Map --> Target Schema

Right ... and if the two schemas are in *different* namespaces, then
you are renaming the constructs in their entirety (prefix and URI)
and my issue does not apply. And if the two schemas are in the
*same* namespace, then DSRL is irrelevant and the target system
should accept the source instance without change.

I fully support DSRL features that totally rename source constructs
to target constructs when the target construct is in another
namespace. Of course the prefix has to change. That isn't the
situation that I was trying to flag. I understood you earlier to say
that you wanted a DSRL instruction that changed the prefix but *not*
the namespace URI, and my only warning was that if you do so then
namespace-qualified names in attribute value contexts would lose
their prefix declarations because DSRL doesn't know (and can't know)
what attributes to change.

But, I'm willing to drop my concerns if no-one else thinks this is an
important issue. Some people believe that namespace-qualified names
in attribute value contexts are evil in and of themselves and should
not be accommodated. I just happen to use them in XSLT and I've
designed them into some of my UBL support vocabularies.

>I know the namespace of the two end points in this list, and that the DSRL
>Map is in the DSRL namespace, but what information does the DSRL map need to
>hold re the prefixes and associated URIs of the end-points, and should this
>information be held in a form that is "DOM viewable" or in the form of
>attributes whose values could be slotted into XSLT statements at appropriate
>points?

Sorry, not sure what you are asking here.

. . . . . . . . . . . Ken

--
Upcoming XSLT/XSL-FO hands-on courses:  Denver,CO March 13-17,2006
World-wide on-site corporate, govt. & user group XML/XSL training.
G. Ken Holman                 mailto:gkholman@CraneSoftwrights.com
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/d/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Cancer Awareness Aug'05  http://www.CraneSoftwrights.com/d/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal
--
DSDL members discussion list
To unsubscribe, please send a message with the
command  "unsubscribe" to dsdl-discuss-request@dsdl.org
(mailto:dsdl-discuss-request@dsdl.org?Subject=unsubscribe)
Received on Thu Dec 8 01:17:36 2005

This archive was generated by hypermail 2.1.8 : Fri Dec 09 2005 - 08:33:02 UTC