[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [dita] Namespaces and Schemas: Some Initial Findings and XSLTImplications
At 14:54 2004-06-29 -0500, Eliot Kimber wrote: >Don Day wrote: > >>On the transforms side, couldn't you just declare the namespace in the >><xsl:stylesheet> element and let the otherwise un-prefixed elements and >>attributes in the transform instance inherit the parent namespace? > >It doesn't appear so--at least this didn't work in my tests and if I undestand the XSLT spec correctly, it explicitly says that unqualified names *do not* match the stylesheet's root namespace but match only names in no namespace (but I could easily be wrong here). If I understand the issue, Eliot is correct. Considering a stylesheet such as: <xsl:stylesheet xmlns="some-namespace"> . . . <xsl:template match="foo"> . . . and an instance such as: <root xmlns="some-namespace"> . . . <foo> . . . The match="foo" template will not match the <foo> element. Instead, the template would have to look more like: <xsl:template match="ns:foo" xmlns:ns="some-namespace"> . . . (where the namespace declaration could be omitted from the template if it is already in scoped--such as by having it on the xsl:stylesheet tag). paul
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]