Previous | Next | Indexes
adultinternetusers > Tutorials > XSLT 2.0 Tutorial > Namespaces (11/11) >

Discovering available namespaces on the element

In XPath 1.0 "namespace::" axis was used for namespace discovery. In XPath 2.0 this axis was deprecated and XPath 2.0 compatible processors are not required to support this axis.

Functions in-scope-prefixes() and namespace-uri-for-prefix() are used for this task.


            <xsl:output  method="xml"

            <xsl:template  match="/aaa">
                        <xsl:for-each  select="descendant::*">
                              <xsl:variable  name="v"
                              <el  name="{name($v)}">
                                    <xsl:for-each  select="in-scope-prefixes(.)">
                                          <nm  prefix="{.}"



            <el  name="o:bbb">
                  <nm  prefix="xml"
                  <nm  prefix="o"
            <el  name="p:ccc">
                  <nm  prefix="xml"
                  <nm  prefix="o"
                  <nm  prefix="p"
            <el  name="ccc">
                  <nm  prefix="xml"
                  <nm  prefix=""

Previous chapter: Multiple Outputs
Next chapter: Keys
Previous page: Namespace creation
Next page: - - -

Kevin Carr in Stanton

Natural Skin Care and European Soaps
Kevin Carr
Mayor Dave Shawver Stanton

You can also get Organic Skin Care products from Bliss Bath Body and you must check out their Natural Body Lotions and bath soaps

Now if you are looking for the best deals on surf clothing from Quiksilver and Roxy then you have to check these amazing deals here:

Hey, check out this Organic Skin Care European Soaps along with Natural Lavender Body Lotion and shea butter

and we can get surf t shirts surfing shirt and And you must check out this website swim suit swimming suit and swim trunks