- http://host:port/menu?id=x in menu.xqm
- http://host:port/topic?id=y in topic.xqm
Both menu.xqm and topic.xqm import a module with common functions (contentrefs.xqm) that resolve content references, for example: contentref:fill-with-product-name(content as node(), product as xs:string)
contentref:fill-with-product-name is the one that makes the node replacement (similar to the flower example).
My 'scheme'-related question is:
Should contentrefs.xqm really be converted to a main module?