RE: adding a namespace declaration to result stylesheet?
"BEGED-DOV,GABE (HP-Corvallis,ex1)" <[email protected]> Wed, 17 Sep 2003 09:31:09 -0700
| Newsgroups | gmane.text.xml.schematron |
|---|---|
| Message-ID | <[email protected]> |
I think we may be thinking of different things vis-a-vis the library element. My problem was how to access extension functions in the test expressions. In order for the extension functions to be accessable to the XSLT implementation, you need to both generate the namespace declaration and the xsl:import. As an example, the following schema element: <sch:library prefix="msxsl" namespace="urn:schemas-microsoft-com:xslt"/> Would generate the appropriate namespace decl in the xsl:stylesheet element and also generate an xsl:import element. The multi-schematron functionality allowed me to construct stand-alone schematron documents that validate a specific disjoint subset of desired behavior and also group these stand-alone schematron documents into a larger validation set.In order to do this, I needed a simple grouping document that would list the individual schemas that were part of the group. This is different from phases since all the phases are grouped in a single document. You can't easily mix and match different sub-schemas together or do loosely coupled authoring, i.e. you do the core schema and I'll do the profileA schema. It may be a very simple example of some of the pipelining capabilities which I haven't looked at. I would love to only use standard capabilities of Schematron since this would enable me to use all the different implementations that are available. This current approach is compatible with most of the existing schematron implementations since it works outside of them. A standard pipelining mechanism would be more powerful. Where would be the best place to look for something that would apply to my use case? For context, we have been using this approach to do some of the validation on the Music/Photo/Video (MPV) documents (see http://www.osta.org/mpv). MPV makes heavy use of profiles (similar to how XHTML and SMIL do). It is very convenient to author small schemas that test a specific profile or subset of a profile and then mix these together as needed. This is similar to phases except that it is done at document granularity. The multischematron document looks like: <sch2:multischematron-input> <sch2:schemas> <sch2:schema href=""/> ... </sch2:schemas> </sch2:multischematron-input> The result document wraps the conformance output of each document in a single sch2:multischematron-output element. Gabe > -----Original Message----- > From: Rick Jelliffe [mailto:[email protected]] > Sent: Monday, September 15, 2003 8:35 AM > To: BEGED-DOV,GABE (HP-Corvallis,ex1) > Cc: [email protected] > Subject: Re: [Schematron-love-in] adding a namespace > declaration to result stylesheet? > > > BEGED-DOV,GABE (HP-Corvallis,ex1) wrote: > > >Does the library element generate the xsl:import for the xslt > >implementation? If so, this is very useful and something I > added to my > >local version of schematron in order to make use of msxsl extension > >functions. When are you planning to make this available? The > <library> > >element and the <let> element are the two things that I added to my > >local version. > > > > > I like pipelines, so I would be adding it as a preprocessor, > to make its > implementation > semantics very clear. But it would be simple macro inclusion of the > children of the > referenced schema's root element (i.e. > document($library)/sch:schema/* IYSWIM). > > >Another thing that I added was a higher level aggregation of > schematron > >documents(multi-schematron). The multi-schematron document > referenced > >the individual schematron documents. The multi-schematron "runner" > >would run the individual schematron against the input > document and wrap > >the resulting output using a single trivial wrapper element > around the > >individual conformance output documents. > > > Could you post an example of what it looks like? How is this > different from > * phases > * libraries > * ISO DSDL's mooted Framework (perhaps rather like XPipeline) > * ISO DSDL's mooted Validation Candidate Selection Language (which > extracts trees from the > instance by namespace, and validates each individually > against one or > more schemas > as appropriate) ? > > >This worked a lot better in terms of authoring discrete validation > >modules that could then be run either individually or as part of a > >larger validation suite. IMO, the alternative of using external > >entities is too intrusive and cumbersome. I don't use the > inheritance > >features of Schematron and feel that a module system that supports > >easy composition is more important to supporting scaleable > validation. > > > > > I am very interested in this. Any more details (or anyone > else who had > to implement something to > cope with scale)? > > Cheers > Rick Jelliffe > ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf