I'd suggest using XQuery for the basic CRUD framework, and dispatch to an XSLT for document generation. You might end up with a default XSLT per schema, plus various XSLTs that override the defaults for particular use-cases. Each document-generating request would supply whatever information is needed to select the right XSLT, plus any parameterization. The XSLTs won't be driven directly by schemas, but you can validate the output against an appropriate schema.
You could also try generating XSLT code dynamically: after all it's XML too. I suspect that's overkill, but you'll be the best judge of that. -- Mike On 5 Jun 2014, at 14:40 , Wanczowski, Andrew <[email protected]> wrote: > I am looking to generate documents that are not coming from external > sources. For example we would have editors filling out a web forms and > then posting them to ML. At that time I would like to detect what type of > content they are trying to create and then generate a document using the > appropriate schema. > > -Drew > > On 6/5/14 4:38 PM, "Michael Blakeley" <[email protected]> wrote: > >> Can you expand on the need to "generate XML documents"? If you've got >> NewsML etc coming in from external sources, what sort of documents are >> "generated within the system"? >> >> -- Mike >> >> On 5 Jun 2014, at 06:58 , Wanczowski, Andrew >> <[email protected]> wrote: >> >>> Hello All, >>> >>> I am currently looking to build a metadata store for various documents >>> and want them to remain in their native schemas. Content will be >>> generated within the system and come from external systems. Some >>> examples are the PRISM, NewsML and IPTC/XMP Schemas. >>> >>> I have been investigating ways to generate XML documents to be stored >>> in MarkLogic. The great thing about MarkLogic is that you can have >>> multiple schemas or schemaless documents in your database. However, this >>> becomes challenging when you want your content to originate in MarkLogic >>> or MarkLogic applications to control full CRUD of the documents. I am >>> looking for something scalable where we would only have to manage one >>> library for all CRUD functions. The current approach would be to have a >>> library module for each schema which will handle all CRUD and >>> serialization/de-serialization. This becomes a maintenance headache. >>> >>> The desired features would be: >>> A single library module to handle document generation >>> Generate a document based on an XML Schema >>> Create, Update and Partial Update should be supported >>> Values should be populated based on user's input from Another XML >>> document or JSON document >>> Input mappings should be configurable form both XML and JSON >>> Serialization/de-serialization of XML and JSON for API usage or web >>> form usage >>> >>> ExistDB has a way to generate an instance from an XML Schema. >>> Documentation can be found at >>> http://en.wikibooks.org/wiki/XQuery/XML_Schema_to_Instance . But this >>> does not do all the features desired. >>> >>> Any input would be extremely helpful! >>> >>> Thanks >>> Drew >>> _______________________________________________ >>> General mailing list >>> [email protected] >>> http://developer.marklogic.com/mailman/listinfo/general >> >> _______________________________________________ >> General mailing list >> [email protected] >> http://developer.marklogic.com/mailman/listinfo/general > > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general > _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
