Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 16th, 2009, 10:37 AM
Friend of Wrox
 
Join Date: Feb 2009
Posts: 119
Thanks: 25
Thanked 3 Times in 3 Posts
Default A Saxon question

A potential client is using some terms that I have never come across.

What is or how do I - compile an xml schema?

What are the Saxonica schema tools? I know about Saxon 9A and B Processor

Regards.
 
Old June 16th, 2009, 10:49 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

If the question is specific to Saxon then it's probably best to ask on the saxon-help mailing list or forum.

The commercial edition of Saxon, Saxon-SA, includes an XML Schema processor. This allows you to validate instance documents against an XSD schema definition, and also to write schema-aware XSLT stylesheets and XQuery queries, which means that type information from the schema can be used to assist in compiling the query (giving the potential better diagnostics and better performance).

Like stylesheets and queries, schemas are processed once into an internal form so that they can be used repeatedly; this process is often called "compiling", though it does not actually generate executable code (in the case of a schema, it generates a finite state automaton which can be used to validate instance documents against the grammar defined in the schema.)
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
 
Old June 16th, 2009, 10:52 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

Saxonica is the name of the company that makes and supports the Saxon product.

Saxon SA ('SA', not 'A') is the schema aware version, Saxon B is the none-schema aware version of the product.

'Compiling' the stylesheet happens every time you run a stylesheet, but if you are going to be running the stylesheet again and again you can pre-compile it, using either the Saxon command line tool or Saxon for Java: http://www.saxonica.com/documentatio...compiling.html
__________________
/- Sam Judson : Wrox Technical Editor -/

Think before you post: What have you tried?
 
Old June 16th, 2009, 10:56 AM
Friend of Wrox
 
Join Date: Feb 2009
Posts: 119
Thanks: 25
Thanked 3 Times in 3 Posts
Default

this is what i have been told to do:

Use Saxonica Schema tools to export or import a compiled schema. The export format is an XML file, known as an SCM file (for schema component model).

So in this case I would use Saxon 9sA, but how do i get the SCM file as output?

Regards.
 
Old June 16th, 2009, 11:02 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

From the command line

java com.saxonica.Validate -xsd:schema.xsd -scmout:schema.scm

Will compile the schema and output the schema component model as an XML file to schema.scm
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
 
Old June 16th, 2009, 11:08 AM
Friend of Wrox
 
Join Date: Feb 2009
Posts: 119
Thanks: 25
Thanked 3 Times in 3 Posts
Default

Okay so now i understand how to do step 1. The following is step 2:

Reverse engineer Saxon's SCM output and transforming it back into XSD documents, one document per target namespace, which would have all the named model groups and attribute groups expanded, all the types-derived-by-extension expanded, and so on. It would require two pieces of work: (a) capturing XSD annotations in the SCM model, and (b) writing the reverse SCM-to-XSD transformation (using XSLT). (there is a little difficulty in this that the xs:annotations we intend to use are now not exported by Saxon-A, but Michael has promised to fix it for us. Note this includes all children of xs:annotations like xs:documentation and xs:appInfo).


How do I do this?

Regards.
 
Old June 16th, 2009, 11:24 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

I think that what you are doing is sufficiently specialized it would be best to take this off-list. I've had some previous correspondence with Prasenjit Biswas about this project.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
 
Old June 16th, 2009, 11:33 AM
Friend of Wrox
 
Join Date: Feb 2009
Posts: 119
Thanks: 25
Thanked 3 Times in 3 Posts
Default

it would be best to take this off-list...

Where do i take it too?

Prasenjit Biswas has asked me if I can do it.

REgards
 
Old June 16th, 2009, 11:39 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

It's mike at saxonica dot com
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
 
Old June 17th, 2009, 03:18 AM
Friend of Wrox
 
Join Date: Feb 2009
Posts: 119
Thanks: 25
Thanked 3 Times in 3 Posts
Default

I sent you an email, my address is jbampton at gmail dot com will send you another as I have a couple of questions





Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Saxon help!!!! Nagaraj XSLT 4 May 15th, 2009 04:51 AM
saxon s9api question amhicraig XSLT 1 December 10th, 2007 05:10 AM
Saxon java question amhicraig XSLT 1 December 7th, 2007 01:21 PM
Saxon 9.0 question ojasrege XSLT 1 November 27th, 2007 06:32 PM
SAXON Ques dev.user06 XSLT 4 July 26th, 2006 10:44 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.