Pseudo table in relax ng compact:
element books
element book
element publisher
element publisherinfo
The table (but in norwegian):
datatypes xsd = "http://www.w3.org/2001/XMLSchema-datatypes"
element bøker{
element bok{
attribute isbn{text},
element title{text},
element utgave{text},
(element forfatter{text}
|element redaktør{text}),
element utgivelsesår{xsd:int},
element fagfelt{text}*,
element referans{text}?,
element innholdsfortegnelse{
element komponent{text}+
},
element forlag{
text,
element url{text},
element kontaktinfo{
element telefon{xsd:integer}?,
element epost{text}?,
element adresse{
element gate{text},
element gatenmr{text},
element postnmr{xsd:int}
}?,
element kontaktperson{
element navn{
element fnavn{text}+,
element mnavn{text}?,
element enavn{text}
},
element adresse{
element gate{text},
element gatenmr{text},
element postnmr{xsd:int}
}?,
element telefon{xsd:integer}?
}?
}
}
}*
}
Is there a way to iterate through this to find a publisher, and check if they have met these conditions (the publisher has released books with the topic (fagfelt) a AND b).
I want to find all publishers who have published books on both subjects only.
Should I rewrite this to make that a possibility or is there a way?
I'm inexperienced with XQuery and xml