Re: [xsl] Referencing content in XML and then processing in XSLT 2.0

Subject: Re: [xsl] Referencing content in XML and then processing in XSLT 2.0
From: Michael Ludwig <milu71@xxxxxx>
Date: Tue, 23 Mar 2010 20:17:09 +0100
Jacobus Reyneke schrieb am 23.03.2010 um 11:21:08 (+0200):

> >> e.g. <company product="The editor &lt;producttype-ref
> >> ref-id=&quot;manual1&quot;/&gt;">
> >
> > That looks awful.  Escaped markup is nearly always wrong.  Why not
> > make it:
> >
> > <company>
> >  <product>The editor <producttype-ref ref-id="manual1">
> >  ...
> 
> It's  awful, I know, but I am trying to use XML elements only to
> represent irreducible elements in my real world domain.

You could use namespaces:

<mf:root
    xmlns:mf="urn:X-meaningful"
    xmlns:ml="urn:X-meaningless">
  <mf:company>
    <ml:name> silly name </ml:name>
  </mf:company>
</mf:root>

But it doesn't look okay to me either, and you're probably right when
you're saying that it's time to rethink your approach.

-- 
Michael Ludwig

Current Thread