Re: Default Attributes and XSD

Christophe Marchand <cmarchand-qd3G5cUq/[email protected]> Fri, 12 Mar 2021 13:49:19 +0100
Newsgroups gmane.text.xml.saxon.help
Message-ID <[email protected]>
Marko, you can have a look at a custom SAXParserFactory [1] that 
*should* be able to load files with default values from schema, if 
schema is referenced from XML with a xsl:schemaLocation  or a 
xsi:noNamespaceSchemaLocation.

I had no time to test it, but you should be able to start Saxon with 
this Factory from command line (-x:... option).

Feel free to use this code as you like, but be careful, it is not 
tested, and there are strict limitations, mainly multiple schema are not 
supported.

Hope that helps,
Christophe

Le 11/03/2021 à 20:30, Marko Hedler a écrit :
> Hi Wendell,
>> 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.
>
> I think, this could be the way to go. I'll give it a try.
>
> Thanks a lot.
> Cheers
> Marko
>
>
>
>
>
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/saxon-help 


_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[email protected]
https://lists.sourceforge.net/lists/listinfo/saxon-help