linking in XML

Subject: linking in XML
From: Knut Alboldt <alboldt@xxxxxxx>
Date: Wed, 04 Oct 2000 12:30:59 +0200
Hi !

If I want to link from one XML-file to another (using IE5.5 + MSXML2) 
including anchors I tried the following:


<?xml ...>

  <section id="test1" linkto="file2.xml#test2">
  any text


<?xml ...>

  <section id="test2">
    text linked to

with the following xsl-script I translate both into a <a>-tag 
(using attribs href="file2.xml#test2" for file1 and name="test2" for

  <xsl:template match="section">
    <div class="section">
      <xsl:if test=".[@id]">
        <!-- this should create the anchor to link to -->
          <xsl:attribute name="name">
            <xsl:value-of select="@id"/>
      <xsl:if test=".[@linkto]">
          <xsl:attribute name="href">
            <xsl:value-of select="@linkto"/>
          link to <xsl:value-of select="@linkto"/>


The result is not what I exspected: the link will display the xml-file
(the URL-line will
also dispolay the anchor: "../file2.xml#test2" , but will not jump to
the corresponding anchor #test2

can somebody help me ?



 XSL-List info and archive:

Current Thread