How to query the rdf format data?

I am new in both rdf and BDB XML, and I have got some problems while using both. Now, I am eager for your help.
I wrote a simple rdf file which can be validated in [http://www.w3.org/RDF/Validator].
{color:#0000ff}<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:class="http://www.ict.ac.cn/e_learning#">
<rdf:Description rdf:about="Chinese">
<class:ID>0000001</class:ID>
<class:teacher>Kongzi</class:teacher>
<class:classroom>101</class:classroom>
<class:lesson>0000000001</class:lesson>
<class:year>2007</class:year>
</rdf:Description>
<rdf:Description rdf:about="Math">
<class:ID>0000002</class:ID>
<class:teacher>Gauss</class:teacher>
<class:classroom>102</class:classroom>
<class:lesson>0000010001</class:lesson>
<class:year>2008</class:year>
</rdf:Description>
</rdf:RDF>
{color}
I create a container, put the content listed above into the container as a document. But no matter what I want to query, for example, {color:#0000ff}"collection('learn')/rdf:RDF/rdf:Description[@rdf:about='Math']"{color}("learn" is the alias), does it return no results. But when I change the "{color:#0000ff}rdf:Description{color}" into whatever other words like "{color:#0000ff}rdf:aaa{color}", in both document and query expression, the results are right. My BDB XML version is 2.4.16.
Could anybody help? Thank you very much!
Edited by: user10795743 on 2009-2-2 下午11:29

Hi,
Just try to set namespace and alias explicitly. Maybe your namespace/alias is not set correctlly.
I've use dbxml shell to test:
1. Create container and document for test.
dbxml> createcontainer learn.xml
dbxml> addAlias learn
Added alias: learn
dbxml> putdocument doc1.xml '<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:class="http://www.ict.ac.cn/e_learning#">
<rdf:Description rdf:about="Chinese">
<class:ID>0000001</class:ID>
<class:teacher>Kongzi</class:teacher>
<class:classroom>101</class:classroom>
<class:lesson>0000000001</class:lesson>
<class:year>2007</class:year>
</rdf:Description>
<rdf:Description rdf:about="Math">
<class:ID>0000002</class:ID>
<class:teacher>Gauss</class:teacher>
<class:classroom>102</class:classroom>
<class:lesson>0000010001</class:lesson>
<class:year>2008</class:year>
</rdf:Description>
</rdf:RDF>'2. set namespace
dbxml> setnamespace rdf http://www.w3.org/1999/02/22-rdf-syntax-ns#
Binding rdf -> http://www.w3.org/1999/02/22-rdf-syntax-ns#
dbxml> setnamespace class http://www.ict.ac.cn/e_learning#
Binding class -> http://www.ict.ac.cn/e_learning#3. query
dbxml> query 'collection("learn")/rdf:RDF/rdf:Description'
2 objects returned for eager expression 'collection("learn")/rdf:RDF/rdf:Description'4; result
dbxml> print
<rdf:Description xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" rdf:about="Chinese">
<class:ID xmlns:class="http://www.ict.ac.cn/e_learning#">0000001</class:ID>
<class:teacher xmlns:class="http://www.ict.ac.cn/e_learning#">Kongzi</class:teacher>
<class:classroom xmlns:class="http://www.ict.ac.cn/e_learning#">101</class:classroom>
<class:lesson xmlns:class="http://www.ict.ac.cn/e_learning#">0000000001</class:lesson>
<class:year xmlns:class="http://www.ict.ac.cn/e_learning#">2007</class:year>
</rdf:Description>
<rdf:Description xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" rdf:about="Math">
<class:ID xmlns:class="http://www.ict.ac.cn/e_learning#">0000002</class:ID>
<class:teacher xmlns:class="http://www.ict.ac.cn/e_learning#">Gauss</class:teacher>
<class:classroom xmlns:class="http://www.ict.ac.cn/e_learning#">102</class:classroom>
<class:lesson xmlns:class="http://www.ict.ac.cn/e_learning#">0000010001</class:lesson>
<class:year xmlns:class="http://www.ict.ac.cn/e_learning#">2008</class:year>
</rdf:Description>

Similar Messages

  • How to retrieve the doc format data from the database?

    Hi Experts,
         I need to retrieve the doc files ( Cv's) from data base to my presentation server. In order to do that what is the field I can use?

    You can use officecontrol UI element for displaying doc files.
    below are some important links
    [Office Control|http://help.sap.com/saphelp_nw04/helpdata/en/5d/a0b16a9d2e4e4d8b2322af6728263f/content.htm]
    [example|http://help.sap.com/saphelp_srm40/helpdata/ru/ef/3483789514b748b6fe1f145e9685ab/content.htm]
    thanks
    sarbjeet singh

  • I had a trouble with my lap top and had to format hard disk and install all soft ware again. could any body tell me how to transfer the application and data in my i phone back to my laptop.

    I had a trouble with my lap top and had to format hard disk and install all soft ware again. could any body tell me how to transfer the application and data in my i phone back to itune.

    You can't. It still thinks that your iPhone is synced with another iTunes library (the one that you had before you reformatted the hard drive.

  • How to query the Date/Time Dataype

    Hi,
    I am trying to query the database with Data/Time Datatype.
    String date=request.getParameter("date");
    String month=request.getParameter("month");
    String year=request.getParameter("year");
    String tosearch=month+"/"+date+"/"+year;
    String getTable="select * from tableRes where dmy='"+tosearch+"'";I would like to know why it is not working?
    I ran through tomcat and it appeared this error:
    Data type mismatch in criteria expression.
    Thanks!

    pramudya81 wrote:
    Rock,
    May I know more detail on your specs?
    What is your DB? Or how is exactly you execute the sql.
    to_date is anyway an Oracle syntax.
    So I guess your DB might be an SQL Server.
    to_date for oracle is equivalent as Convert in SQL Server
    example Select Convert(datetime ,'2002/01/01')
    Hope it works nowBad idea. See reply 1.

  • How to change the paper format in SOST tcode from X_65_80 to X_65_266?

    I got data from OTF in SAPSCRIPT and send by email.
    How to change the paper format in SOST tcode from X_65_80 to X_65_255?
    I need to change it automatically from abap.
    Any suggestion?

    Hi,
           change line size and line count in report.
            By default report line size and line count is taken in printer
           settings
    REgards
    amole

  • How to find the last update date time and user of record field peoplecode

    how to find the last update date time record field peoplecode?
    Thank you.

    One can check the last update date time using the following query
    SELECT LASTUPDDTTM FROM PSPCMPROG WHERE OBJECTVALUE1 LIKE 'RECNAME' AND OBJECTVALUE2 LIKE 'FIELDNAME'

  • How to query the flat files?

    Hi
    How to query the flat files that are used in Etl From EBS source.

    That can be done in OBIEE. Save the flat file as .csv format. Then go to ODBC Administrator on windows machine where you BI server is running, and create an System DSN and select "Microsft Access Text Driver (*.txt, *.csv)" as driver type.
    Next, import tables in RPD using this ODBC connection. Rest of the steps as same as building model from a table source.
    Hope this helps.

  • HOW TO FIND THE REQUIRED DELIVERY DATE IN VA02

    hi
    HOW TO FIND THE REQUIRED DELIVERY DATE IN VA02.
    i want to display this field in my report. what is the fieldname and in which table it is ?

    Hi Jyothsna,
    There are 2 dates when you say Requested Delivery Date
    1.  Header level in VBAK-VDATU is the field
    2.  At item level it is in the schedule line. VBEP-EDATU.
    The relationship between item (VBAP ) and schedule line ( VBEP )is 1 to many. But there will be mutiple schedule lines only if you are using the scheduling functionality. Also note to check for confirmed quantity (VBEP-BMENG) to be greater than 0 and use that schedule lines EDATU date as Requested delivery date.
    regards,
    Advait Gode.

  • How to maintain the material master data in plant

    Hi all,
    while creating BOM I am getting an error "no material master data in plant' can some one help me how to maintain the material master data in plant
    Regards,
    Balu

    Check the material available in MARC table in SE11 transaction against your plant.If it is not available please maintain through MM01 transaction.

  • How to export the text edit data to excel file without splitting the data in excel file?

    how to export the text edit data to excel file without splitting the data in excel file?
    I have a requirement in SAP HR where in the appraiser can add comments in the area given and can export that to excel file. Currently the file is getting exported but the comments getting split into deifferent rows.
    I want the entire comment to be fit in one row.
    Please help.
    Thank you

    Hi,
    if your text edit value is stored in 'lv_string' variable.
    then before exporting the value to excel you have to remove CL_ABAP_CHAR_UTILITIES=>NEWLINE
    that is '#' from the variable lv_string.
    for that use code some thing like this.
    REPLACE ALL OCCURRENCES OF CL_ABAP_CHAR_UTILITIES=>NEWLINE in lv_string WITH space.
    I think this will do the trick.

  • How to track the flow of data from R/2 to BI ?

    Hi Experts,
    Question: How to track the flow of data from R/3 to BI ?
    I want to load master data from R/3 to BI. In BI, i create an infopackage to load data from R/3. Under processing tab i set it as "PSA and then in the InfoObject (package by package)". Its a Full update.
    Now, i start the update to InfoObject. The load goes on well.
    Now, i want to track the flow of data from the master data table in R/3 to Datasource in R/3 then Extractors and then in the PSA in BI and then till the InfoObject. That is the complete flow of data from source table (in R/3) to Target table (in BI).
    Please help me know how this can be done. (For example lets take cost element master data)
    Regards,
    Suraj S Nair

    Hi,
    Data flow :
    BW :
    When u right click on the Master Data Info object -> Select Data flow.Then  it will  show u the details like DS name,IS (If 3.x)
    Once u know the DS then you need to find out the source tables for the R/3 DS.This information will get using ROOSOURCE or ROOSFIELD tables  or help.sap.com.
    My suggestion better to search in Help site for DS source tables.
    DS Tables :
    The following link will provide you the source tables for some of the LO DS.
    https://wiki.sdn.sap.com/wiki/display/BI/BWSDMMFIDATASOURCES
    Regards
    Ram.
    Edited by: Ramakanth Deepak Gandepalli on Dec 22, 2009 9:29 AM

  • How to store the flat file data into custom table?

    Hi,
    Iam working on inbound interface.Can any one tell me how to store the flat file data into custom table?what is the procedure?
    Regards,
    Sujan

    Hie
    u can use function
    F4_FILENAME
    to pick the file from front-end or location.
    then use function
    WS_UPLOAD
    to upload into
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'F4_FILENAME'   "Function to pick file
        EXPORTING
          field_name = 'p_file'     "file
        IMPORTING
          file_name  = p_file.     "file
      CALL FUNCTION 'WS_UPLOAD'
       EXPORTING
         filename                       = p_file1
        TABLES
          data_tab                      = it_line
    *then loop at it_line splitting it into the fields of your custom table.
    loop at it_line.
              split itline at ',' into
              itab-name
              itab-surname.
    endloop.
    then u can insert the values into yo table from the itab work area.
    regards
    Isaac Prince

  • How to engage the "today´s date" in works?

    how to engage the "today´s date" in works?

    I don't understand this question.  assuming you are interested in getting todays date in a cell of a table you can enter the formula:
    =today()

  • How to increase the number of data Business Object can pull for a report?

    Hi,
    I would like to ask around how to increase the number of data Business Object can pull for a report. I have a report which pulls data depending on the date range (ex. From 01/01/2007 - 01/10/2007). But, when the data that is pulled exceeds 5000, the report fails. Is there anyway to increase the number of data that BO can pull?
    Thanks

    Bobby,
       to my knowledge we can't change that. Let me explain this, we have setting in the source system for DS default Data Transfer. there we will assign the processes. if you want to assign 4 you need to change the setting in the source system. For flat files we can change in BW System. We can maintain the setting in the Infopackage level(wht we are assigned in the Source System), but we can't change the process.
    in order to check the setting in source system  SBIW--> General Settings --> Control Parameters for Data Transfer.
    we need to change here, this will effect to all the Data Sources. Before making changes check with your basis.
    All the best.
    Regards,
    Nagesh Ganisetti.

  • How to get the user entered data?

    Hi all,
    I have created an HTMLB DynPage component.
    In That i have created my input screen with textboxes using response.write method.
    i have added one onConfirm event on which the data whould validate.
    so onConfirm method im trying to get the data with request.getParameter method which returns null...
    how to do...how to get the user entered data to do my validations...can anyone plz advice.
    Thanks,
    Viswes

    Hi
    inputfield or textbox component entered directly using response.write(...) are not htmlb , but html.
    to create portal input field (ie HTMLB), you should do something like
    this in the doProcessBeforeOutput member function
    InputField field1 = new InputField("Id1");
    field1.setSize(8); // 8 characters
    this.getForm().addComponent(field1);
    and in doProcessAfterInput member function
    InputField field1 =
    (InputField) this.getComponentByName("Id1");
    you can then manipulate the content of the field.
    Hope this help,
    Guillaume

Maybe you are looking for

  • Calendar app icon is displaying the wrong date

    For some reason on my iPhone's homescreen the icon for the Calendar app has today started displaying the wrong date. It should show today's date, Monday 6th but instead it reads Sunday 5th. What confuses me is that the phone does know the date is Mon

  • Need help printing in Classic to HP 1510

    I'm helping a person with an early 2001 iMac (500 MHz, 384 MB RAM) who's running 10.2.8 and 9.2.2. She got an HP 1510 all-in-one printer/scanner, and I'm trying to get it set up. I installed the printer software for OS X and for 9.2.2 (while running

  • Java - SetDatasource - JOIN query

    Hi, I have created a rpt file using crystal report plugin for eclipse. This report uses 3 Tables. Works fine. but when i want to push a java sql resultset as the datasource the result isn't good, only get one row. ( I need to push resultset because i

  • SPA 514G stuck SOS etc etc unable to recover

    I have two SPA414G IP Phones with screen displaying "S.O.S. – Phone In Recovery Mode" I did follow the procedure to recover SPA514G without any success. I did notice on the Configuration Upgrade that Software Version is 7.5.1tec. (see attached pictur

  • Problem with downloading Oracle8i Enterprise Editon Release 3

    I am bewildered why I can download Oracle8i in IE browser and can't accomplish that in Netscape or Opera. Thank you!