Hi all, I've read that Sedna does not support external variables http://www.sedna.org/progguide/ProgGuidesu4.html
But I have a function that needs to return a URI which is environment specific. declare function rdfutil:getURI($type as xs:string, $id as xs:string) as xs:anyURI { xs:anyURI(concat("http://prod.nxp.com", "/id/", $type, "/", rdfutil:normalizeIdentifier($id))) }; So ideally I want to use a global variable which I can set externally. (e.g. $base_uri) declare function rdfutil:getURI($type as xs:string, $id as xs:string) as xs:anyURI { xs:anyURI(concat($base_uri, "/id/", $type, "/", rdfutil:normalizeIdentifier($id))) }; But Sedna won't allow me to deploy this module which is understandable as I reference a non declared variable Details: at (10:35), syntax error, unexpected ;, expecting := or as or external I could of course change the function signature to declare function rdfutil:getURI($base_uri as xs:string, $type as xs:string, $id as xs:string) as xs:anyURI { xs:anyURI(concat($base_uri, "/id/", $type, "/", rdfutil:normalizeIdentifier($id))) }; But this would have to get propagated to ALL functions calling rdfutil:getURI, which more concretely would involve changing every single function as they all depend on this rdfutil:getURI (in)directly. As a side note, We are using the driver from Charles Foster but that won't help us in this case as this use case is about modules and not standalone xqueries used in our app. So besides the tedious solution of refactoring all function signatures, is there a simpler way? Thx in advance, Robby ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Sedna-discussion mailing list Sedna-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sedna-discussion