« External Data/004 » : différence entre les versions

De Semantic MediaWiki - Sandbox
Ligne 29 : Ligne 29 :
External Data's use of xpath cannot return:  
External Data's use of xpath cannot return:  
# internal XML tags as '''part''' of the desired string (Loman1, Loman 2 above), where the <w></w> tags are simple ignored
# internal XML tags as '''part''' of the desired string (Loman1, Loman 2 above), where the <w></w> tags are simple ignored
# nested XML tags (here p tags) around the desired string, which simple triggers an error message
# nested XML tags (here p tags) around the desired string, which simple triggers an error message. (here: Error: no local variable "Comment" was set.)


[[Category:External Data examples]]
[[Category:External Data examples]]

Version du 16 septembre 2017 à 11:25

Source

External Data/004/source - excerpt from http://www.asnc.cam.ac.uk/irishglossaries/xml/Loman.xml

#get_web_data

#external_value

Loman1
.i. lot-te .i. lotan ar tige í 7 tess indti.
Loman2
.i. lot-te .i. lotan ar tige í 7 tess indti.
but really should have been

<w type="hw">Lite</w> .i. lot-te .i. lotan ar tige í 7 tess indti.

Comment with paragraph tags

Erreur : aucune variable locale « Comment » n’a été définie.

Should have rendered

<comment><p>This comment has been added</p></comment>

Conclusion

External Data's use of xpath cannot return:

  1. internal XML tags as part of the desired string (Loman1, Loman 2 above), where the <w></w> tags are simple ignored
  2. nested XML tags (here p tags) around the desired string, which simple triggers an error message. (here: Error: no local variable "Comment" was set.)
Les cookies nous aident à fournir nos services. En utilisant nos services, vous acceptez notre utilisation de cookies.