Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: Copying without namespace? >Thread Next - Re: Copying without namespace? Re: Copying without namespace?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
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
