Re: Default Attributes and XSD
Wendell Piez <[email protected]> Thu, 11 Mar 2021 13:42:58 -0500
| Newsgroups | gmane.text.xml.saxon.help |
|---|---|
| Message-ID | <CAAO_-xwg_HJVFP832vRn-GaC+f56ri_yFvy4p4KttWNBTjzg6A@mail.gmail.com> |
Yup, as Graydon says there are a couple of ways it could be wired up to run in a single invocation of Saxon. However, I am questioning the requirement, "more than one transformation not allowed". What, your XSD is changing so quickly (or you have so many XSDs) that you have to be able to run the process with a new XSD every time? If on the other hand the XSD is relatively stable, a way to do this would be to run an XSLT to produce your list of values from the schema (once), then use that values list (expressed in XML or XSLT) as a component within your XSLT runtime (many times). So the two passes are distinct and loosely coupled. You are merely giving your XSLT a "look up a default" capability, then externalizing the declarations in your XSD to support that. On the other hand, all this might be a good argument for why those defaults should never have been declared in the DTD (or schema) to begin with. Cheers, Wendell On Thu, Mar 11, 2021 at 11:27 AM Graydon <[email protected]> wrote: > On Thu, Mar 11, 2021 at 05:18:19PM +0100, Marko Hedler scripsit: > > Thanks for your response, > > we have one limitation: (only one single Transformation is allowed. > > Tried to use fn:tranform() to do the 2-step solution: works, but the > > performance ist too low. > > The old-fashioned two-step processing pattern would be > > <xsl:variable name="step1"> > <xsl:apply-templates mode="step1"/> > </xsl:variable> > > <xsl:apply-templates select="$step1"/> > > In my experience, Saxon does this efficiently. > > (Though it's also been my experience that transform() is fast.) > > -- > Graydon Saunders | [email protected] > Þæs oferéode, ðisses swá mæg. > -- Deor ("That passed, so may this.") > > > _______________________________________________ > saxon-help mailing list archived at http://saxon.markmail.org/ > [email protected] > https://lists.sourceforge.net/lists/listinfo/saxon-help > -- ...Wendell Piez... ...wendell -at- nist -dot- gov... ...wendellpiez.com... ...pellucidliterature.org... ...pausepress.org... ...github.com/wendellpiez... ...gitlab.coko.foundation/wendell... _______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ [email protected] https://lists.sourceforge.net/lists/listinfo/saxon-help