Re: [xslt] Trouble printing xmlns: attribute in name space.



On Wed, Jan 12, 2005 at 12:48:00PM -0500, sudhakar+xslt CS Princeton EDU wrote:
> <xsl:element name="oval" namespace="http://oval.mitre.org/XMLSchema/oval";>
>         <xsl:attribute name="xmlns:oval">
>                 http://oval.mitre.org/XMLSchema/oval
>         </xsl:attribute>
> </xsl:element>
> 
> 
> I get this output:
> 
> <oval xmlns="http://oval.mitre.org/XMLSchema/oval";>

  Normal.
Namespaces are NOT attributes in the XPath data model.

> 
> The xmlns:oval is just deleted. I referred the documentation at
> 
> http://www.w3.org/TR/xslt#creating-attributes
> 
> It does not say how to do it.  It just says that the declaration will not
> be output. Docs:

  The XSLT processor will output all namespaces in scope at the place
of the command in the XSLT. Put the namespaces in the XSLT stylesheet.

> PS: Am I asking too dumb questions? Please let me know if these questions
> are inappropriate for the list.

  Dumb, no. Inappropriate, kind of, since they are purely generic XSLT
questions and not specific to libxslt itself. This mean you may or may
not get answers from the list users, while you have more chances to have
and answer from a dedicated source. 
   http://xmlsoft.org/XSLT/bugs.html
  lists such dedicated XSLT resources.

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]