
Luận văn tốt nghiệp: Nghiên cứu, tìm hiểu và xây dựng ứng dụng với
170
string(((position()+count(//*[name()='pc:knows']))*360) div
(count(//*[name()='pc:knows'])+count(//*[name()='foaf:member']))), ',400,350)')"/>
</xsl:attribute>
</image>
<!-- lay hinh kha nang-->
<change>
<xsl:attribute name="pos">
<xsl:value-of select="position()+count(//*[name()='pc:knows'])"/>
</xsl:attribute>
</change>
<image x="0" y="0" width="55" height="45"
xlink:href="http://localhost/webapp/EPerson/images/person.png">
</image>
<!--lay ten nhom-->
<change><!--thay doi tag na`y-->
<xsl:attribute name="pos">
<xsl:value-of select="position()+count(//*[name()='pc:knows'])"/>
</xsl:attribute>
</change>
<text x="20" y="20" textLength="100" lengthAdjust="spacingAndGlyphs"
style="text-anchor: middle;" >
<xsl:value-of select="foaf:name"/>
</text>
<!--in hinh chu nhat-->
<change>
<xsl:attribute name="pos">
<xsl:value-of select="position()+count(//*[name()='pc:knows'])"/>
</xsl:attribute>
</change>
<rect x="60" y="60" width="100" height="25" rx="4" ry="4" style="stroke: green; fill:
none;">
</rect>
</xsl:for-each>
<a >
<xsl:apply-templates select="foaf:homepage"/>
<text x="400" y="380" style="text-anchor: middle;font-family:Time New Romance;
font-size:15; stroke:white;">
</text>

Luận văn tốt nghiệp: Nghiên cứu, tìm hiểu và xây dựng ứng dụng với
171
</a>
</xsl:template>
<xsl:template match="foaf:homepage">
<xsl:attribute name="xlink:href">
<xsl:value-of select="@rdf:resource"/>
</xsl:attribute>
</xsl:template>
</xsl:stylesheet>
Nội dung của file Competence.xsl :
<!--?xml version="1.0" encoding="UTF-8"?-->
<xsl:stylesheet version="1.0"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:dt="urn:schemas-microsoft-com:datatypes"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:dc="http://pURI.org/dc/elements/1.1/"
xmlns:pc="http://localhost/onto/pc/">
<xsl:namespace-alias stylesheet-prefix="dt" result-prefix="xsl"/>
<xsl:namespace-alias stylesheet-prefix="pc" result-prefix="xsl"/>
<xsl:namespace-alias stylesheet-prefix="rdf" result-prefix="xsl"/>
<xsl:namespace-alias stylesheet-prefix="foaf" result-prefix="xsl"/>
<xsl:output method="xml" version="1.0" omit-xml-declaration = "yes"/>
<xsl:template match="/">
<svg width="1024" height="768">
<xsl:apply-templates/>
</svg>
</xsl:template>
<xsl:template match="rdf:RDF">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="pc:Competence">
<circle cx="400" cy="350" r="55" style="stroke: green; fill: #cfc; stroke-width:1.5;

Luận văn tốt nghiệp: Nghiên cứu, tìm hiểu và xây dựng ứng dụng với
172
"/>
<!--lay hinh -->
<image x="365" y="320" width="75" height="65"
xlink:href="http://localhost/webapp/EPerson/images/comp.png"/>
<!-- cac nhom-->
<xsl:for-each select="pc:isKnownBy/foaf:Group">
<!--ve mui ten -->
<image x="456" y="340" width="200" height="20"
xlink:href="http://localhost/webapp/EPerson/images/muiten.jpg">
<xsl:attribute name="transform">
<xsl:value-of select="concat('rotate(', string((position()*360) div
(count(//*[name()='foaf:Person'])+count(//*[name()='foaf:Group']))), ',400,350)')"/>
</xsl:attribute>
</image>
<change>
<xsl:attribute name="pos">
<xsl:value-of select="position()"/>
</xsl:attribute>
</change>
<text x="20" y="20" textLength="100" lengthAdjust="spacingAndGlyphs"
style="text-anchor: middle; stroke:white;" >
</text>
<!--in hinh chu nhat-->
<change>
<xsl:attribute name="pos">
<xsl:value-of select="position()"/>
</xsl:attribute>
</change>
<rect x="60" y="60" width="100" height="25" rx="4" ry="4" style="stroke: white;
fill: none;">
</rect>
<change>
<xsl:attribute name="pos">
<xsl:value-of select="position()"/>
</xsl:attribute>

Luận văn tốt nghiệp: Nghiên cứu, tìm hiểu và xây dựng ứng dụng với
173
</change>
<image x="0" y="0" width="75" height="60"
xlink:href="http://localhost/webapp/EPerson/images/group.png">
</image>
</xsl:for-each>
<!-- cac thanh vien-->
<xsl:for-each select="pc:isKnownBy/foaf:Person">
<!--ve mui ten -->
<image x="456" y="340" width="200" height="20"
xlink:href="http://localhost/webapp/EPerson/images/muiten.jpg">
<xsl:attribute name="transform">
<xsl:value-of select="concat('rotate(',
string(((position()+count(//*[name()='foaf:Group']))*360) div
(count(//*[name()='foaf:Person'])+count(//*[name()='foaf:Group']))), ',400,350)')"/>
</xsl:attribute>
</image>
<!-- lay hinh nhom-->
<change>
<xsl:attribute name="pos">
<xsl:value-of select="position()+count(//*[name()='foaf:Group'])"/>
</xsl:attribute>
</change>
<image x="0" y="0" width="55" height="45"
xlink:href="http://localhost/webapp/EPerson/images/person.png">
</image>
<!--lay ten nhom-->
<change>
<xsl:attribute name="pos">
<xsl:value-of
select="position()+count(//*[name()='foaf:Group'])"/>
</xsl:attribute>
</change>
<text x="20" y="20" textLength="100" lengthAdjust="spacingAndGlyphs"
style="text-anchor: middle;" >
<xsl:value-of select="foaf:name"/>
</text>

Luận văn tốt nghiệp: Nghiên cứu, tìm hiểu và xây dựng ứng dụng với
174
<!--in hinh chu nhat-->
<change>
<xsl:attribute name="pos">
<xsl:value-of select="position()+count(//*[name()='foaf:Group'])"/>
</xsl:attribute>
</change>
<rect x="60" y="60" width="100" height="25" rx="4" ry="4" style="stroke: green;
fill: none;">
</rect>
</xsl:for-each>
<xsl:apply-templates select="foaf:homepage"/>
<text x="400" y="420" style="text-anchor: middle;font-family:Time New
Romance; font-weight: bold; font-size:20;">
<xsl:value-of select="foaf:name"/>
</text>
</xsl:template>
<xsl:template match="foaf:homepage">
<xsl:attribute name="xlink:href">
<xsl:value-of select="@rdf:resource"/>
</xsl:attribute>
</xsl:template>
</xsl:stylesheet>
8.2 Thiết kế xử lý
Với các chức năng đã được đặc tả kỹ trong phần 6.2.3 trên chúng em có các các lược
đồ tuần tự( Sequence Diagrams) và các lược đồ cộng tác( Collaboration Diagram) cho
một số chức năng chính như sau :
• Chức năng tìm người (Find Person) :
o Sequence Diagram
Sơ đồ Sequence Diagram cho chức năng tìm người.

