Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Copying without namespace?

From: Andre-John Mas <andrejohn.mas@-----.--->
To: NULL
Date: 3/4/2008 8:01:00 PM
On Feb 29, 4:55=A0am, Pavel Lepin <p.le...@ctncorp.com> wrote:
> Andre-John Mas <andrejohn....@gmail.com> wrote in
> <4d1e8b09-6641-497e-a194-f87f9b905...@s12g2000prg.googlegroups.com>:
>
> > =A0 =A0 =A0 <xsl:for-each select=3D"$pageMetaData/*">
> > =A0 =A0 =A0 =A0 <xsl:choose>
> > =A0 =A0 =A0 =A0 =A0 <xsl:when test=3D"local-name() =3D 'meta'">
> > =A0 =A0 =A0 =A0 =A0 =A0 <xsl:copy-of select=3D"."/>
> > =A0 =A0 =A0 =A0 =A0 </xsl:when>
> > =A0 =A0 =A0 =A0 =A0 <xsl:otherwise>
> > =A0 =A0 =A0 =A0 =A0 =A0 <meta content=3D"{.}" name=3D"{local-name()}"/>
> > =A0 =A0 =A0 =A0 =A0 </xsl:otherwise>
> > =A0 =A0 =A0 =A0 </xsl:choose>
> > =A0 =A0 =A0 </xsl:for-each>
>
> Awful.

I am not going argue this point. I am trying to convert code that
claims it was creating xhtml pages (it was creating html), to actually
create xhtml compliant output. There have been plenty of developers
dipping in this code before me.

> > The problem is that it copies the namespace when it does
> > so (it appears to be implied, rather than declared).
>
> "Implied rather than declared"? What do you mean?
>
> > So this:
>
> > <meta content=3D"abc" name=3D"dc.creator"/>
>
> > becomes this in the final output:
>
> > <meta xmlns=3D"http://www.myco.com/datalist" content=3D"yuri"
> > name=3D"dc.creator"/>
>
> And what is the problem - the fact that your resulting meta
> element is inhttp://www.myco.com/datalistnamespace, or
> the fact that this namespace is explicitly declared as the
> default namespace on this element?

This name space is something used in the XSL, to refer to a
configuration file specifying localised texts, it is not something
that is meant to be in the output document.

I'll see if I can cobble together an example, but basically what is
being done is copying a block like this, declared in an XML file:

   <meta-tags>
      <meta http-equiv=3D"expires" content=3D"Wed, 26 Feb 1997 08:21:57
GMT" />
      <meta name=3D"authour" content=3D"the author" />
   </meta-tags>

to the output which will be used for rendering the final xhtml page.
For example:

<head>
   <title>mypage</title>
   <meta http-equiv=3D"expires" content=3D"Wed, 26 Feb 1997 08:21:57 GMT" /
>
   <meta name=3D"authour" content=3D"the author" />
</head>

The issue is that I end up with an xhtml document that includes
namespaces that were only meant to be used in the xsl and not the
final document.  Having the "http://www.myco.com/datalist" specified
as part of the meta tag just breaks the page.

Andre




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent