xsl-list
[Top] [All Lists]

RE: Cross reference question

2005-03-30 09:21:14
XSLT can only operate on files that are namespace-well-formed, and a
namespace-well-formed document can't have two colons in a name.

Not knowing RDF, I'm not sure which node you are referring to when you
mention "the node called AdvancedKnowledgeTechnology". You have several
(attribute) nodes here with "AdvancedKnowledgeTechnology" in their content,
but no nodes with this as their name.

Michael Kay
http://www.saxonica.com/ 

-----Original Message-----
From: Fredrik [mailto:faid(_at_)swipnet(_dot_)se] 
Sent: 30 March 2005 16:47
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Cross reference question

Hey,

Just started with XSL and I'm guessing my problem is pretty 
simple, but I 
haven't been able to find any examples.
I'm wondering how I can access the attribute ProgrammeName 
below while I'm 
processing the node called AdvancedKnowledgeTechnology. I 
thought I would 
use the attribute of isCourseOf to find it, but... how?
XML file below, current XSL file further down.


<rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
      xmlns:rdf_="http://protege.stanford.edu/rdf";
      xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#";>

      <rdf:Description rdf:about="AdvancedKnowledgeTechnology"
              rdf_:myns:CourseECTS="5.0"
              rdf_:myns:CourseName="Advanced Knowledge Technology"
              rdfs:label="AdvancedKnowledgeTechnology">
              <rdf_:myns:isCourseOf rdf:resource="MenMachine"/>
              <rdf:type rdf:resource="myns:Course"/>
      </rdf:Description>
      <!-- ... some other similar nodes in between -->
      <rdf:Description rdf:about="MenMachine"
              rdf_:myns:ProgrammeName="Mens-Machine 
Communicatie en Artificial 
Intelligence"
              rdfs:label="MenMachine">
              <rdf_:myns:hasCourse 
rdf:resource="AdvancedKnowledgeTechnology"/>
              <rdf_:myns:isProgrammeOf rdf:resource="GroningenRUG"/>
              <rdf:type rdf:resource="myns:ProgrammeAI"/>
      </rdf:Description>
      <!-- some other similar nodes after this one ... -->
</rdf:RDF>

<!-- For each description -->
<xsl:for-each select="//*">
      <br></br>
      <!-- If it's a course.. -->
      <xsl:if test="contains(local-name(), 'isCourseOf')">
              <!-- Check which programme the course belongs to -->
      </xsl:if>
      <!-- For each attribute of the description -->
      <xsl:for-each select="@*">
              <!-- print selected attributes -->
      </xsl:for-each><br></br>
</xsl:for-each>

Thanks,
Fredrik Henricsson



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>