Hi,
I'm having trouble getting my xslt document function to work in Marklogic
server (4.2)
This xslt:
==============================================
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="html" indent="yes"/>
<xsl:template match="/">
<html>
<body>
<p class="test">
<a
href="http://lcweb2.loc.gov/diglib/ihas/loc.natlib.ihas.200033293/mets.xml">mets
file</a>
<xsl:copy-of
select="document('http://lcweb2.loc.gov/diglib/ihas/loc.natlib.ihas.200033293/mets.xml')"/></p>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
==============================================
when run within oXygen, produce the right result:
==============================================
<html>
<body>
<p class="test"><a
href="http://lcweb2.loc.gov/diglib/ihas/loc.natlib.ihas.200033293/mets.xml">mets
file</a>
<mets:mets xmlns:mods="http://www.loc.gov/mods/v3"
xmlns:rights="http://www.loc.gov/rights/"
xmlns:sm="http://www.loc.gov/mets/profiles/sheetMusic"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:lc="http://www.loc.gov/mets/profiles"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mets="http://www.loc.gov/METS/" OBJID="loc.natlib.ihas.200033293"
xsi:schemaLocation="http://www.loc.gov/METS/
http://www.loc.gov/standards/mets/mets.xsd http://www.loc.gov/mods/v3
http://www.loc.gov/standards/mods/mods.xsd" PROFILE="lc:sheetMusic">
<mets:dmdSec ID="MODS1">
<mets:mdWrap MDTYPE="MODS">
<mets:xmlData>
<mods:mods version="3.3">
.....
</body></html>
==============================================
However, when I run it in CQ, with this xquery:
xquery version "1.0-ml";
let $sourcexml:= <source></source>
return
try {
xdmp:xslt-invoke("/path/to/my.xsl",
document{$sourcexml})
} catch ($exception) {
$exception
}
==============================================
I get this result:
<html>
<body>
<a
href="http://lcweb2.loc.gov/diglib/ihas/loc.natlib.ihas.200033293/mets.xml">mets
file</a>
<p class="test"/>
</body>
</html>
I don't even get an exception... Can you tell what is going on here? I
couldn't find discussion of this on the listserv...
Thanks, Nate
Nate Trail
Network Development and MARC Standards Office
Library of Congress
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general