Skip to content

Mapping of XML / random #56

@psiotwo

Description

@psiotwo

I am trying to map an XML nested list (full example attached):

<person>
   <identifier>1</identifier>
   <address>
       <type>email</type>
       <value>a@b.com</value>
   </address>
   <address>
       <type>phone</type>
       <value>+12345</value>
   </address>
       ...

to produce RDF of the form

:person-1 :hasAddress :address-2 .
:address-1 :type "email" .
:address-1 :value "a@b.com" .
:address-2 :type "phone" .
:address-2 :value "+12345" .
...

Addresses don't have any natural well defined identifier (the value/type fields are noisy) so some artificial needs to be crafted. I don't care about their form, so I tried:

  • to automatically generated it using idlab:random, but it does not seem to work because RMLStreamer seems to generate the random ID for each address multiple times - which seems to make it disconnected from the person (as in the attachment)

  • to be derived from the location of the element in XML using some XPath expression.

Neither worked.

Is there any other option to map that XML to RDF in the way suggested?

sample.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions