English 中文(简体)
从卢旺达国防军档案中生成一个DOT档案
原标题:Generate a .DOT file from a RDF file

我有卢旺达国防军的档案,我希望从中产生一份.。 我愿制定一些规则,以宣传节点和这些节点之间的联系(例如代表婚姻关系的一种特殊arrow)。

这里就是这种转换“规则”的一个例子:

 <person rdf:about="http://www.something.com/EGAnne"
   <j: DateBirth>1981</j: DateBirth>
   <j:Profession>Comptable</j:Profession>
   <j:Gender>Female</j:Gender>
 </j:person>

我想将这些内容转化为这一结果:

a [label = "Anne  n  nD.Birth: 1981  nProfession: Accounting  n", shape = circle, fillcolor = "pink" style = "filled", fontsize = "9", fontname = " Arial, bold "];

Then, to represent the marriage between two instances of the class person, the type of arrow will be "odot" and color "goldenrod":

a -> j [arrowhead = "odot" arrowtail = "odot", dir = both, color = "goldenrod"]

我怎么能够根据上述规则,从卢旺达国防军档案中自动生成.子?

问题回答

xslt是我从Xml中生成图表的最好办法。

对你来说,关键部分可能照此办理......

<xsl:for-each select="whateverThePathIs/person">
<xsl:if test="(./j:Gender &eq;  Female )">
# Output a node for a Female
</xsl:if>
<xsl:if test="(./j:Gender &eq;  Male )">
# Output a node for a Male
</xsl:if>
</xsl:for-each>

这项任务似乎有 p:





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签