Jaap has asked for the wisdom of the Perl Monks concerning the following question:

Let's say i have an xml document like this:
<?xml version="1.0" encoding="UTF-8"?> <document> <products> <product> <name>Stereo</name> </product> <product> <name>TV</name> </product> </products> <manufacturers> <manufacturer> <name>Sony</name> </manufacturer> </manufacturers> </document>
Now i want to embed the information that the TV is made by Sony. What would be the semantically correct way to do this?

According to Eve Maler,

Replies are listed 'Best First'.
Re: (OT) XPointer or XLink?
by holli (Abbot) on Dec 31, 2004 at 18:28 UTC
    i would go for something like:
    <document> <products> <product mid="183"> <name>Stereo</name> </product> <product mid="182"> <name>TV</name> </product> </products> <manufacturers> <manufacturer mid="182"> <name>Sony</name> </manufacturer> <manufacturer mid="183"> <name>SABA</name> </manufacturer> </manufacturers> </document>
    no xlink or xpointer at all.
      Your solution smells very... SQL like. It would be nice if i could ask my XML database (eXist) for something like this (XPath):
      //product[name="Stereo"]/manufacturer
      or something.