Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [XSLT] XSLT-UNBPRFX: (err:XTSE0280) Prefix local has no namespace binding
- Stack Trace
- At line 5 column 0:
- In xdmp:xslt-eval(<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/"><xsl:copy><xsl:apply-templates/></xsl:co...</xsl:stylesheet>, <PersonalInfo><ContactInfo><firstName>Jon</firstName><lastName>Smith</lastName...</PersonalInfo>)
- 3. declare function local:changecontent($type) as xs:string
- 4. {
- 5. switch($type)
- 6. case "ssn" return "111-11-1111"
- 7. case "Country" return "United State"
- At line 29 column 7:
- In xdmp:eval("xquery version "1.0-ml"; declare function loc...", (), <options xmlns="xdmp:eval"><database>15163595336534263915</database><isolation>different-tr...</options>)
- $stylesheet := <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/"><xsl:copy><xsl:apply-templates/></xsl:co...</xsl:stylesheet>
- 27. </xsl:stylesheet>
- 28.
- 29. return xdmp:xslt-eval($stylesheet, document{ <PersonalInfo>
- 30. <ContactInfo>
- 31. <firstName>Jon</firstName>
- In /MarkLogic/appservices/qconsole/qconsole-amped.xqy on line 200
- In amped-qconsole:qconsole-eval("xquery version "1.0-ml"; declare function loc...", (), <options xmlns="xdmp:eval"><database>15163595336534263915</database><isolation>different-tr...</options>)
- $xquery := "xquery version "1.0-ml"; declare function loc..."
- $vars := ()
- $options := <options xmlns="xdmp:eval"><database>15163595336534263915</database><isolation>different-tr...</options>
- xquery version "1.0-ml";
- declare function local:changecontent($type) as xs:string
- {
- switch($type)
- case "ssn" return "111-11-1111"
- case "Country" return "United State"
- default return "Dummy"
- };
- let $stylesheet := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" >
- <xsl:template match="/">
- <xsl:copy>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
- <xsl:template match="ssn|Country">
- <xsl:copy>
- <xsl:value-of select="local:changecontent(local-name(.))"/>
- </xsl:copy>
- </xsl:template>
- <xsl:template match="*">
- <xsl:copy>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
- return xdmp:xslt-eval($stylesheet, document{ <PersonalInfo>
- <ContactInfo>
- <firstName>Jon</firstName>
- <lastName>Smith</lastName>
- <ssn>123-33-2222</ssn>
- <addr>
- <addr1>123 Mocking Bird Lane</addr1>
- <city>Queens</city>
- <state>NY</state>
- </addr>
- </ContactInfo>
- </PersonalInfo>
- }/element())
- namespace-uri(<local:x/>)
- http://www.w3.org/2005/xquery-local-functions
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement