Skip to main content
This forum is closed to new posts and responses. New discussions are now taking place in the IBM Developer Answers forum.
Information Mgmt
New to Lotus
How to buy
Live demos
Technical library
Forums & community
Java™ technology
Open source
SOA and Web services
Web development
My developerWorks
About dW
Submit content

developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum



PreviousPrevious NextNext

It is working according to spec.
George Langlais 24.Oct.02 01:46 PM Lotus Notes
Applications Development 6.0 All Platforms

Section "5.2 - Namespace Defaulting" of the XML Namespaces spec ( states:
    A default namespace is considered to apply to the element where it is declared (if that element has no namespace prefix), and to all elements with no prefix within the content of that element. If the URI reference in a default namespace declaration is empty, then unprefixed elements in the scope of the declaration are not considered to be in any namespace. Note that default namespaces do not apply directly to attributes

I underlined the last sentence to highlight its significance as the key point here.

So, what does this mean? The database element in your dxl has xmlns='' as an attribute, and so the database element itself (because it is not explicitly qualified) and all its subelements that are not explicitly qualified or overridden by another xmlns="..." attribute (ie, all elements of the dxl in this case) have names that belong to the "" namespace by default, but none of the attributes belong to that namespace. The attributes, instead, belong to NO namespace, which is often thought of as a namespace with a null string for a name.

For example, the following item element in the dxl ...
    <item name='Title'><text>Title</text></item>

... would be interpreted by a parser as ...
    <dxl:item name='Title'><dxl:text>Title</text></item>

... and specifically NOT as ...
    <dxl:item dxl:name='Title'><dxl:text>Title</text></item>

... because attributes do not inherit namespaces as do elements. So when your stylesheet tries to match "@dxl:name='Title'" for example, it won't find a match because the attribute in the dxl is simply "name" and not "dxl:name".

To fix this, remove the "dxl:" from the parameter expressions in your select statements. Here is the relevant part with appropriate strike-throughs:

<xsl:template match="dxl:document">
<TD border="0">
<xsl:attribute name="href">
<xsl:value-of select="dxl:item[@dxl:name='Link']/dxl:text"/>
<xsl:value-of select="dxl:item[@dxl:name='Title']/dxl:text"/><BR/>
<xsl:value-of select="dxl:item[@dxl:name='Description']/dxl:text"/>

XSLT Transformations of Notes 6 DXL... (Glenn Druce 24.Oct.02)
. . RE: XSLT Transformations of Notes 6... (Thom Bentley 24.Oct.02)
. . XML namespaces FAQ (Les Szklanny 24.Oct.02)
. . It is working according to spec. (George Langlais... 24.Oct.02)
. . . . RE: It is working according to spec... (Roger Carter 10.Dec.02)
. . . . Ok, that works but Default Namespac... (Glenn Druce 24.Oct.02)
. . . . . . Setting xmlns=" (George Langlais... 29.Oct.02)
. . . . . . . . But may-be xmlns and xmlns:dxl? (Heinz Mathys 15.Nov.03)
. . RE: XSLT Transformations of Notes 6... (Michael Golding... 24.Oct.02)
. . RE: XSLT Transformations of Notes 6... (Gary Broad 24.Oct.02)
. . . . RE: XSLT Transformations of Notes 6... (Thom Bentley 24.Oct.02)
. . Working Version of XSLT Transformat... (Glenn Druce 24.Oct.02)
. . . . Glenn, I said the same thing about ... (Thom Bentley 25.Oct.02)

Document Options

  Document options
Print this pagePrint this page

Search this forum

Forum views and search

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Advanced search

Member Tools

RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds


Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds


IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums

 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite