Open karina-klinkeviciute opened 1 month ago
source
XPath should be name/text()
.
Also, I'm thinking, maybe we don't need text()
? If property receives an Element instance, then text()
could be applied automatically?
I'm not sure if this could have any other implications?
Yes, I agree. Then it would be easier on the eyes. But then it should be the same everywhere, probably. In converting XSD to DSA, the same.
DSA
property sources should be written in a way that they could be used to retrieve data from the source. For XML documents, it would be anXPath
expression.For elements, if we want the text of the element, the
XPath
expression would be<name>/text()
- i.e. a name of the element with an added/text()
.When creating
DSA
from anXML
source, element names are added as they are. Instead,/text()
should be added to them.If we have this
XML
structure:The resulting
DSA
now looks like this:And instead it should look like this:
i.e. instead of
name
it should bename.text()
and instead ofpopulation
it should bepopulation.text()