This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Question about linking using ID/IDREF
- To: xsl-list at lists dot mulberrytech dot com
- Subject: [xsl] Question about linking using ID/IDREF
- From: Betty dot Risher at Jeppesen dot com
- Date: Thu, 19 Apr 2001 08:05:05 -0600
- Reply-To: xsl-list at lists dot mulberrytech dot com
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.
Thanks,
Betty Risher
XML Code example
<row>
<entry align="LEFT">
<unlist bulltype="NDASH" indent="1">
<unlitem>
<para>
<refint origin="JEPP" refid="T07-10-00-500-801-A">TASK
07-10-00-500-801-A</refint>
</para>
</unlitem>
</unlist>
</entry>
<entry align="LEFT">
<para>Complete Aircraft Jacking</para>
</entry>
</row>
<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>
<tfmatr>
<pretopic>
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>
</font>
</xsl:template>
DTD Example
<!ELEMENT task (title, tfmatr, topic+, graphic*)>
<!ATTLIST task
chapnbr CDATA #IMPLIED
confltr CDATA #IMPLIED
efftext CDATA #IMPLIED
effvect CDATA #IMPLIED
func CDATA #IMPLIED
genattr CDATA #IMPLIED
id ID #REQUIRED
<!ELEMENT refint (#PCDATA)>
<!ATTLIST refint
origin (JEPP | MFR) #IMPLIED
refid IDREF #REQUIRED
genattr CDATA #IMPLIED
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list