cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eliza.Khosr...@tminus10.com
Subject HELP! XPointer support in Cocoon 1.7.4?
Date Fri, 18 Aug 2000 01:22:15 GMT

Hello,

A few days ago, I posted a message regarding XLink/XPointer support in
Cocoon 1.7.4.

XLink seems to be working, but I can't get XPointer working.  So, I was
wondering if anyone can help me.
(PLEASE REPLY DIRECTLY SINCE I AM NOT PART OF DL)

Basically, I have defined elements in my "file1.xml" that have an ID
attribute and a child element "Name" that is set to some string as shown
below.

<notebook>
   <note ID="aaa">
       <Name>some-string</Name>
   </note>
   <note ID="bbb">
      <Name>some-string</Name>
</notebook>

In my "file2.xml" file, I am referencing the note element using:

<whatever
     xmlns:xlink="http://www.w3.org/1999/xlink"
     xlink:href="file1.xml#xpointer(id('aaa'))"
     xlink:title="file1.xml#xpointer(id('aaa')/self::Name)"/>

 And, in my XSL file to create HTML, I added the followings to access the
references:

<xsl:template match="whatever">
<xsl:text>Inside whatever</xsl:text>
<li>
       <xsl:element name="a">
           <xsl:attribute name="href">
                <xsl:value-of select="@xlink:href"/>
           </xsl:attribute>
<xsl:value-of select="@xlink:title"/>
</li>
</xsl:template>

I use XML SPY to create and edit my files and XML SPY doesn't complain
about the above so I assume my XML/XSL files are vaild.  But, then when I
run it on Cocoon, I only get my "Inside whatever" string and nothing else.
No link, whatsoever!!!  Does anyone know what I am doing wrong here.
I even tried not using id and try other methods shown below and had no
luck.

                                                          xlink:href
="file1xml#xpointer(/child:notebook/child::note[position()=1])"
                         xlink:title
="file1.xml#xpointer(/child:notebook/child:note[position
()=1]/self::Name)"/>

Thanks in advance,
Eliza


Mime
View raw message