!!!Risten2 meeting
* since last meeting
* next
!!!Since last meeting
* rewrite search to avoid overwrite issue - __DONE__
* rewrite article fetching to add json attributes (no other changes to the article xml)
Problems with the last one:
{{{
{string($hit)}
{
for $entry in $hit/..
return (
{string($entry)}
{$entry//l}
{string($entry/mg)
for $tg in $entry//tg
return (
{$tg}
}
)
}
}}}
Instead of using XQuery to transform the xml, use xsl:
{{{
transform:transform($entry, xs:anyURI("add-json-array.xsl"), ())
}}}
with the stylesheet {{add-json-array.xsl}} containing the following:
{{{
}}}
The resulting XQuery:
{{{
{string($hit)}
{
for $entry in $hit/..
return
transform:transform($entry, xs:anyURI("add-json-array.xsl"), ())
}
}}}
returns the complete xml as json in a consistent structure, althogh the json array nodes are duplicated. Probably not a major issue, though, as long as it is consistent.