[xsl] Question about linking using ID/IDREF

Subject: [xsl] Question about linking using ID/IDREF
From: Betty.Risher@xxxxxxxxxxxx
Date: Thu, 19 Apr 2001 08:05:05 -0600

Hi, I am just starting out using XSLT and have run into an issue.

I am trying to create a link between data in my xml that may occur anywhere in
the text.

 The text is defined with <refint> using an attribute of  "refid" to link  to
the attribute of "id".  I read earlier that I needed to use the XSLT style in
conjunction with a DTD.  I used XMLSPY to auto-generate a DTD.  Once I got my
coding in place, I tried to view this data in IE5.5 but it doesn't seem to work.
When I place my cursor over the link, in the info-line at the bottom of IE5.5 I
see, file:///c:/bjdir/amm/chap07.xml#T07-10-00-500-801-A.

 I'm at a loss as to what I could be doing incorrectly.  I would appreciate any
help in resolving this issue.

I've listed below examples of my XML,  my XSL coding and my DTD coding.


Betty Risher

XML Code example

  <entry align="LEFT">
    <unlist bulltype="NDASH" indent="1">
           <refint origin="JEPP" refid="T07-10-00-500-801-A">TASK
  <entry align="LEFT">
    <para>Complete Aircraft Jacking</para>

<task chapnbr="07" confltr="A" efftext="ALL" effvect="001999" func="500" genattr
="CHAPNBR SECTNBR SUBJNBR ID EFFTEXT EFFVECT" id="T07-10-00-500-801-A" sectnbr="
10" seq="801" subjnbr="00">
  <title genattr="LBL" lbl="2.">Complete Aircraft Jacking</title>

XSL Example coding

<xsl:template match="para/refint">
  <font color="blue">
      <a><xsl:attribute name="href">#<xsl:value-of select="@refid"/></
xsl:attribute><xsl:value-of select="id(@refid)"/><xsl:value-of select="."/></a>

DTD Example

<!ELEMENT task (title, tfmatr, topic+, graphic*)>
<!ATTLIST task
  chapnbr CDATA #IMPLIED
  confltr CDATA #IMPLIED
  efftext CDATA #IMPLIED
  effvect CDATA #IMPLIED
  genattr CDATA #IMPLIED

<!ELEMENT refint (#PCDATA)>
<!ATTLIST refint
  origin (JEPP | MFR) #IMPLIED
  genattr CDATA #IMPLIED

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread