I have a XML doc that looks something like this:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xml" href="um.xsl"?>
<?xml-stylesheet type="text/xsl" href="um.xsl"?>
<MCI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="schema.xsd">
<PAGE ID="INTRO">
<TITLE>Bla Bla</TITLE>
<BODY>Bla Bla</BODY>
</PAGE>
<PAGE ID="OBJECTIVES">
<TITLE>Bla Bla</TITLE>
<BODY>Bla Bla</BODY>
</PAGE>
<PAGE ID="COURSES">
<TITLE>Bla Bla</TITLE>
<BODY>Bla Bla</BODY>
</PAGE>
And XSL:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:key name="page-id" match="PAGE" use="@ID"/>
<xsl:output method="html"/>
<!--the first time, i load the page with contents of page id = intro-->
some html
<xsl:value-of select="key('page-id','INTRO')/TITLE"/>
some html
<xsl:value-of select="key('page-id','INTRO')/BODY"/>
some html
<!--now, i want to make a link to load another tag conter - objectives,
something like: (obsiously, it doesn't work....)-->
some html
<a href="#{'OBJECTIVES'}">
<xsl:value-of select="key('page-id','OBJECTIVES')/TITLE"/>
</a>
<!--the intention: pass the 'OBJECTIVES' parameter and load the tag
indicated by parameter, or something like that.. i know i sound a bit
confused, but i only started working with xml a very short time ago. Thx
for help-->
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!