[Corona] Example of fetching with transform?

Ryan Grimm grimm at xqdev.com
Tue Dec 13 10:33:30 PST 2011


Hi Scott.  I found the issue and am working on a solution to the bug.  Will probably have one committed in under 30 min.

--Ryan


On Dec 13, 2011, at 9:34 AM, Scott Conroy wrote:

> Not even trying to do anything with the content at this point - since my actual XSLT isn't ready and requirements are still being worked up - I'm more trying to get a feel for the fetch functionality of Corona.  The XSLT I uploaded was just:
> 
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>     <xsl:template match="/">
>         <html>
>             <body>
>             Hello world.
>             </body>
>         </html>
>     </xsl:template>
> </xsl:stylesheet>
> 
> I expected it to return just an HTML Hello World without any of the content in the actual XML file (which, in that example, happened to be the XML result of an upload of a binary file with extractContent=true).  I tried with some XHTML files and the result is the same - the XSLT seems to be ignored and the content is returned as-stored.
> 
> On Tue, Dec 13, 2011 at 12:03 PM, Ryan Grimm <grimm at xqdev.com> wrote:
> Hi Scott,
> 
> If you're applying the XSLT to an XML document (as I'm assuming you are), the input node for the XSLT is the document node.  If you'd like something else to be passed into the XSLT you can use the extractPath to do so.  So perhaps your template isn't matching against the document node.  If that info doesn't help, could you send me the XSLT that you're using?
> 
> --Ryan
> 
> 
> On Dec 13, 2011, at 8:16 AM, Scott Conroy wrote:
> 
> > Can someone offer an example of a Get that applies an XSLT?  Having uploaded a very simple transform using:
> >
> > curl --upload-file transform1.xslt "http://user:pw@localhost:9004/manage/transformer/transform1.xslt"
> >
> > Trying the below just returns the content as-is rather than the transformed content:
> >
> > curl "http://user:pw@localhost:9004/store?uri=/hi/install.pdf-sidecar&applyTransform=transform1.xslt"
> >
> > Perhaps I need to supply the path to the xslt or something like that?
> >
> > _______________________________________________
> > Corona mailing list
> > Corona at developer.marklogic.com
> > http://developer.marklogic.com/mailman/listinfo/corona
> 
> 



More information about the Corona mailing list