[dsdl-discuss] Re: FDIS for Part 8]

From: Martin Bryan <martin@is-thought.co.uk>
Date: Sat Apr 28 2007 - 19:13:13 UTC

Jirka

Thanks for your comments (sorry I missed them last weekend!)

I have implemented most of them, but have not been able to accept the
following for the reasons given below:

>Page 3, §6.1:
You draft says that if a content of dsrl:from/dsrl:to contains qualified
name then that this namespace must be declared on the corresponding
dsrl:from/dsrl:to element. Why is this? Why it is not allowed to declare
prefix once on dsrl:maps for example? I think that DSRL should left
definition of namespace declarations in scope to respective Namespaces
in XML 1.0 specification (section 6.1 Namespace Scoping).

The problem here is that the names are defined in content. Namespaces do not
apply to content. There will normally be no elements (or attributes) with
the relevant namespace declared for use within the map. Even if a prefix in
the name map is the same as one used to define the map, there is no
guarantee that the uri being referenced by that prefix is the same. The only
place that the prefix/uri combinations can be applied is during the
transformation process. So the transformation process for the specific
element occurrence needs to know what the uri for the namespace prefix used
in the content. It is arguable whether or not the name should be declared as
a local namespace, rather than as just a simple namespace attribute as Rick
suggested, but I decided that we should not introduce Yet Another Way Of
Declaring Namespaces when all that was needed was to pick up the local
declarations of namespace prefixes. (There are also political problems with
implementing changes at ballot level that have not been considered at the
ballot meeting, as mentioned before.)

>To summarize my comments to entities: The current proposal is far from
being useful. Because:

>1. Doesn't allow references between entities

The infinite renaming of nested entities is just too complicated for DSRL,
which is just a simple form of transformation. Even XSLT patterns do not
allow entity mapping to be done. Sorry, but I rejected this idea because I
could not implement it, most other developers would have trouble
implementing it and there is a restriction on me that I can't publish the
standard until there is at least one implementation (and I have to publish
it in a 4 year timescale!!!!)

>2. Markup inside replacement text is escaped -- so it is not markup
anymore and can't be processed without reparsing as a separate document

Again this was deliberate. The idea is to produce a renamed document that
can be reparsed against an alternative schema. The renamed entities are
deemed to be part of that schema. Their replacement text cannot be invoked
until the renamed instance is parsed agains the target schema.

>3. Mechanism for attaching entity definitions to document instance is
not defined.

There is deliberately no standarized way for doing this because there is no
way of detecting which form of schema will be used to validate the output
document. Among the possible ways are of doing this:
1) Declare the entities as a local subset at the start of the instance as a
DTD (the only valid solution if XML schema validation is required)
2) Add the entitiy declarations to an existing DTD (using human intervention
if needs be!)
3) Create a seperate file and reference this as an external entity set
within you DTD
4) Use a system defined method to add entries to an existing file in a
catalog entry that you know is referenced by all your DTDs
etc

>Page 22:
XML sample document is not well-formed because it references entities
not defined in Adresse.dtd

Text has been added in the next paragraph to show that the DSRLentities set
created by map conversion needs to be invoked on the instance being parsed
against the DTD.

Warning to Part 8 reviewers: The relevant sentence in the Annex has been
amended to make this clearer. This is the only substantive change in the
draft the will be sent out shortly.

>Page 27:
What is the purpose of including entity definitions in XSLT file when no
entities are used in this XSLT?

This is a technique that is specific to the example application that allows
the special form of revision definitions used within the transformation to
be activated.

>Page 32:
It seems that XSLT file is outputted twice, search ]] characters.

Hopefully not in the current version

>Moreover it is not clear how entities could be mapped using XSLT, as
XPath data model (which is used by XSLT) doesn't preserve entity references.

Yep. That's why XSLT 2.0 is used for the example application, which requires
the knowledge of where entities were defined that is only available from DOM
Level 2. This is one of the big bug-bears of trying to convert entity names.
I know my solution does not cover all scenarios: at least it covers some and
there is one implementation that shows how it might be (somewhat
inefficiently) implemented using existing widely distributed XML tools.

Martin

--
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 Sat Apr 28 21:13:24 2007

This archive was generated by hypermail 2.1.8 : Sun Apr 29 2007 - 20:33:02 UTC