Re: Was: [xsl] mode and moved to Namespaces

Subject: Re: Was: [xsl] mode and moved to Namespaces
From: Jirka Kosek <jirka@xxxxxxxx>
Date: Tue, 19 Apr 2011 17:26:48 +0200
Hash: SHA1

ac wrote:

> Maybe you did not get the streaming content requirements which
> precludes, at least in principle, doing dynamic loading of each
> localization file.  Any unpredictable number of languages need to be
> available, in a single transformation.  Constant re-loading will not
> solve anything.

Subsequent calls to document()/doc() function are returning previously
loaded and parsed document tree so there is no speed/memory penalty
attached to it. Your transformation will use as much memory as is needed
for languages used during this transformation.

> As for defining additional namespaces and changing the schema, what is
> wrong with doing it once, at design time, for all languages that will
> need to be supported?

I have never taken part in a project where everything was known at the
design time. Maybe be this is rare exception and you will be very lucky.

> Simply wrong is easy to say, but it is probably a relative thing like
> all others.  Could you better explain to me why using namespaces would
> be "simply wrong", especially when they better solve the problem at stake?

With pleasure. For example given your source:

<word en:instance="Mr" en-f:instance="Mrs" fr:instance="M."
fr-f:instance="Mme" ... />

it would be very unnatural to write queries against such model. Imagine
you need to retrieve for example:

- -- all English words
- -- all female variant of word

In your example you are using namespaces to encode information which
would be more natural to express as attribute/element values or their
respective nesting.

> You refer to my dictionary example, but not to my locator examples, with
> GML, for example, or the others.  I get the feeling that the overall
> picture could mean something too.

Honestly, thread is too long to digest what you are referring too now.
I'm just saying that way you are using namespaces for storing
localization data is wrong. I'm not saying anything about other use of
namespaces in your solution.


- --
- ------------------------------------------------------------------
  Jirka Kosek      e-mail: jirka@xxxxxxxx
- ------------------------------------------------------------------
       Professional XML consulting and training services
  DocBook customization, custom XSLT/XSL-FO document processing
- ------------------------------------------------------------------
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
- ------------------------------------------------------------------
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla -


Current Thread