hi there! would be really great, if someone could take a short look at my code! i got the following error-message: Error on line 7 column 5 of file:/E:/path/aufgabe2a.xpath: XPST0003: XQuery syntax error in #…gory{“test”}} { if#: expected “)”, found “{” Failed to compile query the passage, where the error raises is the following:
<books> { for $x in //book return ( element { node-name($x) }{attribute category{"test"}} { if(contains(string($x/title),"XML")) then (
so… now i have two possibles… 1. delete the ‘{attribute category{“test”}}’ passage… or 2. delete all the inner content
if(contains(string($x/title),"XML")) then (
both variants work fine… 1. only with the element and not attributs but with inner elements or 2. with element and attribute, but without more inner elements… has someone an idea?? thanx a lot!