Subject:KEYWORD EXTRACTION FROM XML DOCUMENT Author:Muhammad Akram Date:10 Sep 2007 03:49 PM
HI,
i have imported a relational data into XML file, i have attribute diagnosis, containing a string containing disease symptoms and disease like malaria. All i want is to extract the record that has a malaria in diagnosis field.
I used the XQuery to extract the records using string matching, it works but i do not want to do string Matching.
IS there anyother way to do it using namespaces or metadata of xml document, if yes, please do guide me.
Subject:KEYWORD EXTRACTION FROM XML DOCUMENT Author:Muhammad Akram Date:10 Sep 2007 07:49 PM
HI,
I am using Stylus Studio 2007 Enterprise Suite, and following is part of example code
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE s:sequence []>
<DIAGNOSIS xmlns:s="http://www.stylusstudio.com/xquery">
<CONSULTATION>
<DIAGNOSIS_ID>1</DIAGNOSIS_ID>
<PATIENT_ID>P0001</PATIENT_ID>
<STAFF_ID>St2125</STAFF_ID>
<FINDINGS>Symptoms of high fever cold means he got malaria</FINDINGS>
</CONSULTATION>
<CONSULTATION>
<DIAGNOSIS_ID>2</DIAGNOSIS_ID>
<PATIENT_ID>P0003</PATIENT_ID>
<STAFF_ID>St2125</STAFF_ID>
<FINDINGS>headache and stomachache got fever diagnosed to have typhoid</FINDINGS>
</CONSULTATION>
<CONSULTATION>
<DIAGNOSIS_ID>3</DIAGNOSIS_ID>
<PATIENT_ID>P0005</PATIENT_ID>
<STAFF_ID>St2155</STAFF_ID>
<FINDINGS>Symptoms of high fever cold She got malaria</FINDINGS>
</CONSULTATION>
</DIAGNOSIS>
Subject:KEYWORD EXTRACTION FROM XML DOCUMENT Author:Tony Lavinio Date:11 Sep 2007 08:27 AM
Namespaces are a way to group XML element names together.
I don't see how you would use them in searching.
And metadata is something stored outside of the document,
such as in an XML repository. Certainly you can use XQuery
to search for keywords there, but where _is_ 'there' for
you? Filesystems typically don't store any significant
metadata.
Subject:KEYWORD EXTRACTION FROM XML DOCUMENT Author:Muhammad Akram Date:23 Sep 2007 01:31 PM
HI
I understand as what you have explained,i have seen an example of doing what i need to do. Below is the example code and working...
<products>
<product><name>Water Corola</name>
<price>15<price>
</product >
<product> </product>
</products>
--------------------------------------------
This XMl file is associated to the following RDF description.
Catalog.xml#product1 lastUpdate 10/1/2005.
Catalog.xml#product2 lastUpdate 10/2/1990.
----------------------------------------------
To get products which lastupdate is before 1990, the query is as follows:
for $p in doc(http://.../catalog.xml) //product
metadata $p in
SELECT ?p
WHERE (?p lastUpdate ?u)
AND ?u < 1/1/1990
return $p
------------------------------------
In this query, variable $p stores the product elements
of the document (line 1). The SPARQL query (lines
3 and 4) stores in variable ?p elements which last
update, stored in variable ?u, is before 1990. The
content of variable $p in the external XQuery query
is intersected with the content of the ?p variable in
internal SPARQL query, yielding the set of desired
products.
------------------------------------
I want to do something like this but i am not aware of how to create RDF using Stylus studio, or may be some other way.. and how to associate this RDF to XML file.. I could understand the query but will i be able to do it in stylus studio.. I tried to fid creating RDF in stylus studio, but did not find any help relating this..
Subject:KEYWORD EXTRACTION FROM XML DOCUMENT Author:Tony Lavinio Date:25 Sep 2007 08:18 AM
Stylus Studio does XSLT and XQuery, but not SPARQL.
And although you can use RDL:XML within the XML editor,
we don't support other serializations such as N3.