Re: [Dspace-tech] XML from dissemination crosswalk
I finally solved this by invoking some more Cocoon magic. I just kept my generator as is and then added an XSL transform to the Cocoon pipeline that copies the generator output and adds DocType. Not super-elegant, but really simple. Jason Jason Stirnaman Biomedical Librarian, Digital Projects A.R. Dykes Library, University of Kansas Medical Center jstirna...@kumc.edu 913-588-7319 On 9/30/2011 at 04:50 PM, in message 4E86399F.A73 : 5 : 23711, Jason Stirnaman wrote: I have one (final, I hope) problem. Mark's suggestion is working nicely, except that I need to apply a DocType declaration to my output and Saxoutputter ignores DTD events. So, while I can use JDOM to apply the declaration, it doesn't survive Sax. Is there any other way to render the DocType using JDOM? I can set xsl:output in my stylesheet, but then I think I'd have to iterate through a collection of items to build a raw document of dim:dim elements and then do a second transform somehow invoking a plain ol' XSLT transformer with my crosswalk stylesheet to perform a second transform. I haven't figured out yet how to setup the plain ol' transformer using my stylesheet but it seems it should be something like this DisseminationCrosswalk nlmxwalk = (DisseminationCrosswalk)PluginManager.getNamedPlugin(DisseminationCrosswalk.class,nlm); XSLTransformer nlmtx = nlmxwalk.getTransformer(dissemination); nlmdoc = nlmtx.transform(dimdoc); Thanks, Jason Jason Stirnaman Biomedical Librarian, Digital Projects A.R. Dykes Library, University of Kansas Medical Center jstirna...@kumc.edu 913-588-7319 On 9/21/2011 at 01:49 AM, in message cama9da6i21cxg55eri5twuqdb8z9elp8taj4_7bgmsgosg1...@mail.gmail.com, Mark Diggory mdigg...@atmire.com wrote: Jason, Ok, in this case you don't need a packager, what you need is a Cocoon Generator that renders the Crosswalk to the browser. Take a look at the OREGenerator... http://scm.dspace.org/svn/repo/dspace/trunk/dspace-xmlui/dspace-xmlui-api/src/main/java/org/dspace/app/xmlui/cocoon/DSpaceOREGenerator.java It will show how to generate the crosswalk into Cocoon. You'll find the Cocoons configuration for the ore.xml generator in the default sitemap. map:match pattern=metadata/handle/*/*/ore.xml** map:generate type=DSpaceOREGenerator map:parameter name=handle value={1}/{2}/ map:parameter name=extra value={3}/ /map:generate map:serialize type=xml/ /map:match http://scm.dspace.org/svn/repo/dspace/trunk/dspace-xmlui/dspace-xmlui-webapp/src/main/webapp/sitemap.xmap On Tue, Sep 20, 2011 at 2:35 PM, Jason Stirnaman jstirna...@kumc.edu wrote: Here's the follow-up to my previous question. I have a crude (but useable) XSLT crosswalk (nlm) in DSpace. It transforms DIM metadata to fit the NLM Journal Publishing profile. I can test the output successfully with OAI-PMH. As it turns out, I don't really need to export bitstreams. I just need the metadata for a set of items within a collection that would be specified by the end-user/Community Owner. So, if I want just the crosswalk output for that set of items and I don't want the OAI protocol wrapper or the bitstreams, then do I still need a custom packager for that as in Mark's IMSCP example? I expect the answer is yes. I think what 'm really wanting is to be able to call the crosswalk as a method on the collection, in a RESTful way, and return the output as a single XML document for the collection containing each of the transformed items. Conjured example: handle/2271/883/nlm.xml or nlm/handle/2271/883 Jason Jason Stirnaman Biomedical Librarian, Digital Projects A.R. Dykes Library, University of Kansas Medical Center jstirna...@kumc.edu 913-588-7319 -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech -- Mark Diggory @mire Inc. 2888 Loker Avenue East, Suite 305, Carlsbad, CA. 92010 Esperantolaan 4, Heverlee 3001, Belgium www.atmire.com -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense.
Re: [Dspace-tech] XML from dissemination crosswalk
I have one (final, I hope) problem. Mark's suggestion is working nicely, except that I need to apply a DocType declaration to my output and Saxoutputter ignores DTD events. So, while I can use JDOM to apply the declaration, it doesn't survive Sax. Is there any other way to render the DocType using JDOM? I can set xsl:output in my stylesheet, but then I think I'd have to iterate through a collection of items to build a raw document of dim:dim elements and then do a second transform somehow invoking a plain ol' XSLT transformer with my crosswalk stylesheet to perform a second transform. I haven't figured out yet how to setup the plain ol' transformer using my stylesheet but it seems it should be something like this DisseminationCrosswalk nlmxwalk = (DisseminationCrosswalk)PluginManager.getNamedPlugin(DisseminationCrosswalk.class,nlm); XSLTransformer nlmtx = nlmxwalk.getTransformer(dissemination); nlmdoc = nlmtx.transform(dimdoc); Thanks, Jason Jason Stirnaman Biomedical Librarian, Digital Projects A.R. Dykes Library, University of Kansas Medical Center jstirna...@kumc.edu 913-588-7319 On 9/21/2011 at 01:49 AM, in message cama9da6i21cxg55eri5twuqdb8z9elp8taj4_7bgmsgosg1...@mail.gmail.com, Mark Diggory mdigg...@atmire.com wrote: Jason, Ok, in this case you don't need a packager, what you need is a Cocoon Generator that renders the Crosswalk to the browser. Take a look at the OREGenerator... http://scm.dspace.org/svn/repo/dspace/trunk/dspace-xmlui/dspace-xmlui-api/src/main/java/org/dspace/app/xmlui/cocoon/DSpaceOREGenerator.java It will show how to generate the crosswalk into Cocoon. You'll find the Cocoons configuration for the ore.xml generator in the default sitemap. map:match pattern=metadata/handle/*/*/ore.xml** map:generate type=DSpaceOREGenerator map:parameter name=handle value={1}/{2}/ map:parameter name=extra value={3}/ /map:generate map:serialize type=xml/ /map:match http://scm.dspace.org/svn/repo/dspace/trunk/dspace-xmlui/dspace-xmlui-webapp/src/main/webapp/sitemap.xmap On Tue, Sep 20, 2011 at 2:35 PM, Jason Stirnaman jstirna...@kumc.edu wrote: Here's the follow-up to my previous question. I have a crude (but useable) XSLT crosswalk (nlm) in DSpace. It transforms DIM metadata to fit the NLM Journal Publishing profile. I can test the output successfully with OAI-PMH. As it turns out, I don't really need to export bitstreams. I just need the metadata for a set of items within a collection that would be specified by the end-user/Community Owner. So, if I want just the crosswalk output for that set of items and I don't want the OAI protocol wrapper or the bitstreams, then do I still need a custom packager for that as in Mark's IMSCP example? I expect the answer is yes. I think what 'm really wanting is to be able to call the crosswalk as a method on the collection, in a RESTful way, and return the output as a single XML document for the collection containing each of the transformed items. Conjured example: handle/2271/883/nlm.xml or nlm/handle/2271/883 Jason Jason Stirnaman Biomedical Librarian, Digital Projects A.R. Dykes Library, University of Kansas Medical Center jstirna...@kumc.edu 913-588-7319 -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech -- Mark Diggory @mire Inc. 2888 Loker Avenue East, Suite 305, Carlsbad, CA. 92010 Esperantolaan 4, Heverlee 3001, Belgium www.atmire.com -- All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2dcopy2___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech
Re: [Dspace-tech] XML from dissemination crosswalk
Mark's suggestion is working nicely, but I still have one (final?) problem. I can't figure out how to make Saxoutputter generate a DocType declaration. I use JDOM to add the DocType to my document, but Saxoutputter ignores it. It's hard to tell from http://www.jdom.org/docs/apidocs/org/jdom/output/SAXOutputter.html whether DTDHandler will provide this or whether it's even supported by Saxoutputter. It looks like it might be possible to set it using setOutputProperties(java.util.Properties props) ? I've copied alot from OREGenerator; mine still extends AbstractGenerator. I may be able to set it in my XSLT, but I'd rather use the DOM or transformer if possible. Jason Jason Stirnaman Biomedical Librarian, Digital Projects A.R. Dykes Library, University of Kansas Medical Center jstirna...@kumc.edu 913-588-7319 On 9/21/2011 at 01:49 AM, in message cama9da6i21cxg55eri5twuqdb8z9elp8taj4_7bgmsgosg1...@mail.gmail.com, Mark Diggory mdigg...@atmire.com wrote: Jason, Ok, in this case you don't need a packager, what you need is a Cocoon Generator that renders the Crosswalk to the browser. Take a look at the OREGenerator... http://scm.dspace.org/svn/repo/dspace/trunk/dspace-xmlui/dspace-xmlui-api/src/main/java/org/dspace/app/xmlui/cocoon/DSpaceOREGenerator.java It will show how to generate the crosswalk into Cocoon. You'll find the Cocoons configuration for the ore.xml generator in the default sitemap. map:match pattern=metadata/handle/*/*/ore.xml** map:generate type=DSpaceOREGenerator map:parameter name=handle value={1}/{2}/ map:parameter name=extra value={3}/ /map:generate map:serialize type=xml/ /map:match http://scm.dspace.org/svn/repo/dspace/trunk/dspace-xmlui/dspace-xmlui-webapp/src/main/webapp/sitemap.xmap On Tue, Sep 20, 2011 at 2:35 PM, Jason Stirnaman jstirna...@kumc.edu wrote: Here's the follow-up to my previous question. I have a crude (but useable) XSLT crosswalk (nlm) in DSpace. It transforms DIM metadata to fit the NLM Journal Publishing profile. I can test the output successfully with OAI-PMH. As it turns out, I don't really need to export bitstreams. I just need the metadata for a set of items within a collection that would be specified by the end-user/Community Owner. So, if I want just the crosswalk output for that set of items and I don't want the OAI protocol wrapper or the bitstreams, then do I still need a custom packager for that as in Mark's IMSCP example? I expect the answer is yes. I think what 'm really wanting is to be able to call the crosswalk as a method on the collection, in a RESTful way, and return the output as a single XML document for the collection containing each of the transformed items. Conjured example: handle/2271/883/nlm.xml or nlm/handle/2271/883 Jason Jason Stirnaman Biomedical Librarian, Digital Projects A.R. Dykes Library, University of Kansas Medical Center jstirna...@kumc.edu 913-588-7319 -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech -- Mark Diggory @mire Inc. 2888 Loker Avenue East, Suite 305, Carlsbad, CA. 92010 Esperantolaan 4, Heverlee 3001, Belgium www.atmire.com -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech
Re: [Dspace-tech] XML from dissemination crosswalk
Jason, Ok, in this case you don't need a packager, what you need is a Cocoon Generator that renders the Crosswalk to the browser. Take a look at the OREGenerator... http://scm.dspace.org/svn/repo/dspace/trunk/dspace-xmlui/dspace-xmlui-api/src/main/java/org/dspace/app/xmlui/cocoon/DSpaceOREGenerator.java It will show how to generate the crosswalk into Cocoon. You'll find the Cocoons configuration for the ore.xml generator in the default sitemap. map:match pattern=metadata/handle/*/*/ore.xml** map:generate type=DSpaceOREGenerator map:parameter name=handle value={1}/{2}/ map:parameter name=extra value={3}/ /map:generate map:serialize type=xml/ /map:match http://scm.dspace.org/svn/repo/dspace/trunk/dspace-xmlui/dspace-xmlui-webapp/src/main/webapp/sitemap.xmap On Tue, Sep 20, 2011 at 2:35 PM, Jason Stirnaman jstirna...@kumc.edu wrote: Here's the follow-up to my previous question. I have a crude (but useable) XSLT crosswalk (nlm) in DSpace. It transforms DIM metadata to fit the NLM Journal Publishing profile. I can test the output successfully with OAI-PMH. As it turns out, I don't really need to export bitstreams. I just need the metadata for a set of items within a collection that would be specified by the end-user/Community Owner. So, if I want just the crosswalk output for that set of items and I don't want the OAI protocol wrapper or the bitstreams, then do I still need a custom packager for that as in Mark's IMSCP example? I expect the answer is yes. I think what 'm really wanting is to be able to call the crosswalk as a method on the collection, in a RESTful way, and return the output as a single XML document for the collection containing each of the transformed items. Conjured example: handle/2271/883/nlm.xml or nlm/handle/2271/883 Jason Jason Stirnaman Biomedical Librarian, Digital Projects A.R. Dykes Library, University of Kansas Medical Center jstirna...@kumc.edu 913-588-7319 -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech -- Mark Diggory @mire Inc. 2888 Loker Avenue East, Suite 305, Carlsbad, CA. 92010 Esperantolaan 4, Heverlee 3001, Belgium www.atmire.com -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech
[Dspace-tech] XML from dissemination crosswalk
Here's the follow-up to my previous question. I have a crude (but useable) XSLT crosswalk (nlm) in DSpace. It transforms DIM metadata to fit the NLM Journal Publishing profile. I can test the output successfully with OAI-PMH. As it turns out, I don't really need to export bitstreams. I just need the metadata for a set of items within a collection that would be specified by the end-user/Community Owner. So, if I want just the crosswalk output for that set of items and I don't want the OAI protocol wrapper or the bitstreams, then do I still need a custom packager for that as in Mark's IMSCP example? I expect the answer is yes. I think what 'm really wanting is to be able to call the crosswalk as a method on the collection, in a RESTful way, and return the output as a single XML document for the collection containing each of the transformed items. Conjured example: handle/2271/883/nlm.xml or nlm/handle/2271/883 Jason Jason Stirnaman Biomedical Librarian, Digital Projects A.R. Dykes Library, University of Kansas Medical Center jstirna...@kumc.edu 913-588-7319 -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech