Erik,
>I thought I answered this but apparently not ;-) No worries, there does seem to be a few problems linking SA in! > >Does this work correctly from the command-line, with the same SA JAR? On command line it all works fine. > > From the point OPS runs the transformation, assuming you are actually >running Saxon SA, OPS doesn't do anything particular: it's all Saxon code! So probably best to contact Mike Kay about this then? > >-Erik > >Ryan Puddephatt wrote: >> Erik, >> Thanks for the reply, I've found out why this isn't working, it's >> not matching on any of my templates because it isn't recognizing the >> schema-element function. I have the following example which shows the >> problem: >> >> <p:processor name="oxf:saxon8sa"> >> <p:input name="data"> >> <root xmlns="http://www.teleflex.com/ns/xlex-description"> >> <element> >> <text>This is a test</text> >> </element> >> </root> >> </p:input> >> <p:input name="config"> >> <xsl:stylesheet version="2.0" >> xmlns:xs="http://www.w3.org/2001/XMLSchema" >> xmlns:x="http://www.teleflex.com/ns/xlex-description"> >> <xsl:import-schema >> namespace="http://www.teleflex.com/ns/xlex-description"> >> <xs:schema >> xmlns:xs="http://www.w3.org/2001/XMLSchema" >elementFormDefault="qualified" >> targetNamespace="http://www.teleflex.com/ns/xlex-description"> >> <xs:element name="root"> >> <xs:complexType> >> <xs:sequence> >> <xs:element ref="x:element"/> >> </xs:sequence> >> </xs:complexType> >> </xs:element> >> <xs:element name="element"> >> <xs:complexType> >> <xs:choice maxOccurs="unbounded"> >> <xs:element name="text" >type="xs:string"/> >> </xs:choice> >> </xs:complexType> >> </xs:element> >> </xs:schema> >> </xsl:import-schema> >> <xsl:template match="schema-element(x:element)"> >> <result><xsl:value-of select="."/></result> >> </xsl:template> >> </xsl:stylesheet> >> </p:input> >> <p:output name="data" ref="data"/> >> </p:processor> >> >> Replacing the function with element() makes it work for this example, but >> doesn't give an true match against the schema, obviously! OPS doesn't >give >> me any exception or stack trace it just serves up, I've tried it with >Log4J >> on debug, but nothing unusual >> >> Any ideas? >> >> Ryan Puddephatt >> Software Engineer >> TFX Group - IT UK >> 1 Michaelson Square >> Livingston >> West Lothian >> Scotand >> EH54 7DP >> >> * [hidden email] >> ( 01506 407 110 >> 7 01506 407 108 >> >>> -----Original Message----- >>> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez >>> Sent: 02 May 2006 00:16 >>> To: [hidden email] >>> Subject: Re: [ops-users] Schema Aware XSLT problems >>> >>> The line: >>> >>> java net.sf.saxon.Query "{<a >>> xmlns:nc='java:net.sf.saxon.om.NamespaceConstant'>{nc:XDT()}</a>}" >>> >>> is to be run from the command-line, using your Saxon SA JAR. >>> >>> This way you should obtain the actual namespace URI for the xdt prefix >>> that is used by this particular version of Saxon. This is the URI you >>> should use in your stylesheet when you do xmlns:xdt="...". So did you >>> change that namespace declaration, or did you have trouble figuring out >>> what is that namespace URI? >>> >>> -Erik >>> >>> Ryan Puddephatt wrote: >>>> Erik, >>>> Where would this solution go? Is it somewhere in the stylesheet? Or >>>> java? >>>> >>>> Thanks >>>> >>>> Ryan >>>> >>>> Ryan Puddephatt >>>> Software Engineer >>>> TFX Group - IT UK >>>> 1 Michaelson Square >>>> Livingston >>>> West Lothian >>>> Scotand >>>> EH54 7DP >>>> >>>> * [hidden email] >>>> ( 01506 407 110 >>>> 7 01506 407 108 >>>> >>>>> -----Original Message----- >>>>> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik >Bruchez >>>>> Sent: 01 May 2006 04:20 >>>>> To: [hidden email] >>>>> Subject: Re: [ops-users] Schema Aware XSLT problems >>>>> >>>>> See the answer attached. >>>>> >>>>> Can you try getting the namespace from the implementation, and then >see >>>>> if changing it fixes your issue? >>>>> >>>>> -Erik >>>>> >>>>> Ryan Puddephatt wrote: >>>>>> Thanks Erik, let me know when you get a response >>>>>> >>>>>> Ryan >>>>>> >>>>>> Ryan Puddephatt >>>>>> Software Engineer >>>>>> TFX Group - IT UK >>>>>> 1 Michaelson Square >>>>>> Livingston >>>>>> West Lothian >>>>>> Scotand >>>>>> EH54 7DP >>>>>> >>>>>> * [hidden email] >>>>>> ( 01506 407 110 >>>>>> 7 01506 407 108 >>>> >>>> >>>> >>>> ----------------------------------------------------------------------- >- >>>> >>>> >>>> -- >>>> You receive this message as a subscriber of the [hidden email] >>> mailing list. >>>> To unsubscribe: mailto:[hidden email] >>>> For general help: mailto:[hidden email]?subject=help >>>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws >>> >>> -- >>> Orbeon - XForms Everywhere: >>> http://www.orbeon.com/blog/ >> >> >> >> >> ------------------------------------------------------------------------ >> >> >> -- >> You receive this message as a subscriber of the [hidden email] >mailing list. >> To unsubscribe: mailto:[hidden email] >> For general help: mailto:[hidden email]?subject=help >> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > >-- >Orbeon - XForms Everywhere: >http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Erik,
I have noticed something, I tried running this standalone, one within the OPS application directory and one outside, when OPS is running the schema-element function is not matched, when it isn't it matches fine. Could it be the matter of class paths? Ryan Ryan Puddephatt Software Engineer TFX Group - IT UK 1 Michaelson Square Livingston West Lothian Scotand EH54 7DP * [hidden email] ( 01506 407 110 7 01506 407 108 >-----Original Message----- >From: Ryan Puddephatt [mailto:[hidden email]] >Sent: 04 May 2006 10:30 >To: [hidden email] >Subject: RE: [ops-users] Schema Aware XSLT problems > >Erik, > >>I thought I answered this but apparently not ;-) > >No worries, there does seem to be a few problems linking SA in! >> >>Does this work correctly from the command-line, with the same SA JAR? > >On command line it all works fine. > >> >> From the point OPS runs the transformation, assuming you are actually >>running Saxon SA, OPS doesn't do anything particular: it's all Saxon code! > >So probably best to contact Mike Kay about this then? > >> >>-Erik >> >>Ryan Puddephatt wrote: >>> Erik, >>> Thanks for the reply, I've found out why this isn't working, it's >>> not matching on any of my templates because it isn't recognizing the >>> schema-element function. I have the following example which shows the >>> problem: >>> >>> <p:processor name="oxf:saxon8sa"> >>> <p:input name="data"> >>> <root xmlns="http://www.teleflex.com/ns/xlex-description"> >>> <element> >>> <text>This is a test</text> >>> </element> >>> </root> >>> </p:input> >>> <p:input name="config"> >>> <xsl:stylesheet version="2.0" >>> xmlns:xs="http://www.w3.org/2001/XMLSchema" >>> xmlns:x="http://www.teleflex.com/ns/xlex-description"> >>> <xsl:import-schema >>> namespace="http://www.teleflex.com/ns/xlex-description"> >>> <xs:schema >>> xmlns:xs="http://www.w3.org/2001/XMLSchema" >>elementFormDefault="qualified" >>> targetNamespace="http://www.teleflex.com/ns/xlex-description"> >>> <xs:element name="root"> >>> <xs:complexType> >>> <xs:sequence> >>> <xs:element ref="x:element"/> >>> </xs:sequence> >>> </xs:complexType> >>> </xs:element> >>> <xs:element name="element"> >>> <xs:complexType> >>> <xs:choice maxOccurs="unbounded"> >>> <xs:element name="text" >>type="xs:string"/> >>> </xs:choice> >>> </xs:complexType> >>> </xs:element> >>> </xs:schema> >>> </xsl:import-schema> >>> <xsl:template match="schema-element(x:element)"> >>> <result><xsl:value-of select="."/></result> >>> </xsl:template> >>> </xsl:stylesheet> >>> </p:input> >>> <p:output name="data" ref="data"/> >>> </p:processor> >>> >>> Replacing the function with element() makes it work for this example, >but >>> doesn't give an true match against the schema, obviously! OPS doesn't >>give >>> me any exception or stack trace it just serves up, I've tried it with >>Log4J >>> on debug, but nothing unusual >>> >>> Any ideas? >>> >>> Ryan Puddephatt >>> Software Engineer >>> TFX Group - IT UK >>> 1 Michaelson Square >>> Livingston >>> West Lothian >>> Scotand >>> EH54 7DP >>> >>> * [hidden email] >>> ( 01506 407 110 >>> 7 01506 407 108 >>> >>>> -----Original Message----- >>>> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik >Bruchez >>>> Sent: 02 May 2006 00:16 >>>> To: [hidden email] >>>> Subject: Re: [ops-users] Schema Aware XSLT problems >>>> >>>> The line: >>>> >>>> java net.sf.saxon.Query "{<a >>>> xmlns:nc='java:net.sf.saxon.om.NamespaceConstant'>{nc:XDT()}</a>}" >>>> >>>> is to be run from the command-line, using your Saxon SA JAR. >>>> >>>> This way you should obtain the actual namespace URI for the xdt prefix >>>> that is used by this particular version of Saxon. This is the URI you >>>> should use in your stylesheet when you do xmlns:xdt="...". So did you >>>> change that namespace declaration, or did you have trouble figuring out >>>> what is that namespace URI? >>>> >>>> -Erik >>>> >>>> Ryan Puddephatt wrote: >>>>> Erik, >>>>> Where would this solution go? Is it somewhere in the stylesheet? Or >>>>> java? >>>>> >>>>> Thanks >>>>> >>>>> Ryan >>>>> >>>>> Ryan Puddephatt >>>>> Software Engineer >>>>> TFX Group - IT UK >>>>> 1 Michaelson Square >>>>> Livingston >>>>> West Lothian >>>>> Scotand >>>>> EH54 7DP >>>>> >>>>> * [hidden email] >>>>> ( 01506 407 110 >>>>> 7 01506 407 108 >>>>> >>>>>> -----Original Message----- >>>>>> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik >>Bruchez >>>>>> Sent: 01 May 2006 04:20 >>>>>> To: [hidden email] >>>>>> Subject: Re: [ops-users] Schema Aware XSLT problems >>>>>> >>>>>> See the answer attached. >>>>>> >>>>>> Can you try getting the namespace from the implementation, and then >>see >>>>>> if changing it fixes your issue? >>>>>> >>>>>> -Erik >>>>>> >>>>>> Ryan Puddephatt wrote: >>>>>>> Thanks Erik, let me know when you get a response >>>>>>> >>>>>>> Ryan >>>>>>> >>>>>>> Ryan Puddephatt >>>>>>> Software Engineer >>>>>>> TFX Group - IT UK >>>>>>> 1 Michaelson Square >>>>>>> Livingston >>>>>>> West Lothian >>>>>>> Scotand >>>>>>> EH54 7DP >>>>>>> >>>>>>> * [hidden email] >>>>>>> ( 01506 407 110 >>>>>>> 7 01506 407 108 >>>>> >>>>> >>>>> >>>>> ---------------------------------------------------------------------- >- >>- >>>>> >>>>> >>>>> -- >>>>> You receive this message as a subscriber of the ops- >[hidden email] >>>> mailing list. >>>>> To unsubscribe: mailto:[hidden email] >>>>> For general help: mailto:[hidden email]?subject=help >>>>> ObjectWeb mailing lists service home page: >http://www.objectweb.org/wws >>>> >>>> -- >>>> Orbeon - XForms Everywhere: >>>> http://www.orbeon.com/blog/ >>> >>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> >>> -- >>> You receive this message as a subscriber of the [hidden email] >>mailing list. >>> To unsubscribe: mailto:[hidden email] >>> For general help: mailto:[hidden email]?subject=help >>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws >> >> >>-- >>Orbeon - XForms Everywhere: >>http://www.orbeon.com/blog/ > > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Ryan,
What do you mean by "within the OPS application directory"? What kind of command-line do you run? -Erik Ryan Puddephatt wrote: > Erik, > I have noticed something, I tried running this standalone, one > within the OPS application directory and one outside, when OPS is running > the schema-element function is not matched, when it isn't it matches fine. > Could it be the matter of class paths? > > Ryan > > Ryan Puddephatt > Software Engineer > TFX Group - IT UK > 1 Michaelson Square > Livingston > West Lothian > Scotand > EH54 7DP > > * [hidden email] > ( 01506 407 110 > 7 01506 407 108 -- Orbeon - XForms Everywhere: http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
I run a java com.saxonica.Transform function using the jar in the OPS lib
directory and the files within the OPS directory. I noticed that when I have OPS running the command line doesn't work either, but when I don't it works. Could this be SaxonSA using the Orbeon Saxon jar rather than the saxon8.jar because OPS/Eclipse changes the class path? The only place it seems to be having problems is matching schema-element() on templates, but I haven't been able to test anything else Ryan Ryan Puddephatt Software Engineer TFX Group - IT UK 1 Michaelson Square Livingston West Lothian Scotand EH54 7DP * [hidden email] ( 01506 407 110 7 01506 407 108 >-----Original Message----- >From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez >Sent: 08 May 2006 22:57 >To: [hidden email] >Subject: Re: [ops-users] Schema Aware XSLT problems > >Ryan, > >What do you mean by "within the OPS application directory"? What kind >of command-line do you run? > >-Erik > >Ryan Puddephatt wrote: > > Erik, > > I have noticed something, I tried running this standalone, one > > within the OPS application directory and one outside, when OPS is >running > > the schema-element function is not matched, when it isn't it matches >fine. > > Could it be the matter of class paths? > > > > Ryan > > > > Ryan Puddephatt > > Software Engineer > > TFX Group - IT UK > > 1 Michaelson Square > > Livingston > > West Lothian > > Scotand > > EH54 7DP > > > > * [hidden email] > > ( 01506 407 110 > > 7 01506 407 108 > > >-- >Orbeon - XForms Everywhere: >http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
OPS running shouldn't change the classpath, certainly not the classpath
of an already open shell / command window. BTW we do have an SA license so we should be able to reproduce the problem if you still have it. Can you produce a small set of files (XPL, XSLT and schema) which exhibits the problem? Thanks, -Erik Ryan Puddephatt wrote: > I run a java com.saxonica.Transform function using the jar in the OPS lib > directory and the files within the OPS directory. I noticed that when I have > OPS running the command line doesn't work either, but when I don't it works. > > Could this be SaxonSA using the Orbeon Saxon jar rather than the saxon8.jar > because OPS/Eclipse changes the class path? The only place it seems to be > having problems is matching schema-element() on templates, but I haven't > been able to test anything else > > Ryan > > Ryan Puddephatt > Software Engineer > TFX Group - IT UK > 1 Michaelson Square > Livingston > West Lothian > Scotand > EH54 7DP > > * [hidden email] > ( 01506 407 110 > 7 01506 407 108 > > >> -----Original Message----- >> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez >> Sent: 08 May 2006 22:57 >> To: [hidden email] >> Subject: Re: [ops-users] Schema Aware XSLT problems >> >> Ryan, >> >> What do you mean by "within the OPS application directory"? What kind >> of command-line do you run? >> >> -Erik >> >> Ryan Puddephatt wrote: >>> Erik, >>> I have noticed something, I tried running this standalone, one >>> within the OPS application directory and one outside, when OPS is >> running >>> the schema-element function is not matched, when it isn't it matches >> fine. >>> Could it be the matter of class paths? >>> >>> Ryan >>> >>> Ryan Puddephatt >>> Software Engineer >>> TFX Group - IT UK >>> 1 Michaelson Square >>> Livingston >>> West Lothian >>> Scotand >>> EH54 7DP >>> >>> * [hidden email] >>> ( 01506 407 110 >>> 7 01506 407 108 >> >> -- >> Orbeon - XForms Everywhere: >> http://www.orbeon.com/blog/ > > > > > ------------------------------------------------------------------------ > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws -- Orbeon - XForms Everywhere: http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Erik,
Attached are the files required, just put them all in the same directory and call model.xpl! I have the following in my custom-processors.xml file <processor name="oxf:saxon8sa"> <instantiation name="oxf:generic-xslt-2.0"> <input name="transformer"> <config> <class>com.saxonica.SchemaAwareTransformerFactory</class> </config> </input> </instantiation> </processor> And the saxon8sa.jar and saxon8-dom.jar files in the lib directory! This should give you a empty XML document because it isn't matching the schema-element() function! Thanks Ryan Puddephatt Software Engineer TFX Group - IT UK 1 Michaelson Square Livingston West Lothian Scotand EH54 7DP * [hidden email] ( 01506 407 110 7 01506 407 108 >-----Original Message----- >From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez >Sent: 12 May 2006 22:57 >To: [hidden email] >Subject: Re: [ops-users] Schema Aware XSLT problems > >OPS running shouldn't change the classpath, certainly not the classpath >of an already open shell / command window. > >BTW we do have an SA license so we should be able to reproduce the >problem if you still have it. Can you produce a small set of files (XPL, >XSLT and schema) which exhibits the problem? > >Thanks, > >-Erik > >Ryan Puddephatt wrote: >> I run a java com.saxonica.Transform function using the jar in the OPS lib >> directory and the files within the OPS directory. I noticed that when I >have >> OPS running the command line doesn't work either, but when I don't it >works. >> >> Could this be SaxonSA using the Orbeon Saxon jar rather than the >saxon8.jar >> because OPS/Eclipse changes the class path? The only place it seems to be >> having problems is matching schema-element() on templates, but I haven't >> been able to test anything else >> >> Ryan >> >> Ryan Puddephatt >> Software Engineer >> TFX Group - IT UK >> 1 Michaelson Square >> Livingston >> West Lothian >> Scotand >> EH54 7DP >> >> * [hidden email] >> ( 01506 407 110 >> 7 01506 407 108 >> >> >>> -----Original Message----- >>> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez >>> Sent: 08 May 2006 22:57 >>> To: [hidden email] >>> Subject: Re: [ops-users] Schema Aware XSLT problems >>> >>> Ryan, >>> >>> What do you mean by "within the OPS application directory"? What kind >>> of command-line do you run? >>> >>> -Erik >>> >>> Ryan Puddephatt wrote: >>>> Erik, >>>> I have noticed something, I tried running this standalone, one >>>> within the OPS application directory and one outside, when OPS is >>> running >>>> the schema-element function is not matched, when it isn't it matches >>> fine. >>>> Could it be the matter of class paths? >>>> >>>> Ryan >>>> >>>> Ryan Puddephatt >>>> Software Engineer >>>> TFX Group - IT UK >>>> 1 Michaelson Square >>>> Livingston >>>> West Lothian >>>> Scotand >>>> EH54 7DP >>>> >>>> * [hidden email] >>>> ( 01506 407 110 >>>> 7 01506 407 108 >>> >>> -- >>> Orbeon - XForms Everywhere: >>> http://www.orbeon.com/blog/ >> >> >> >> >> ------------------------------------------------------------------------ >> >> >> -- >> You receive this message as a subscriber of the [hidden email] >mailing list. >> To unsubscribe: mailto:[hidden email] >> For general help: mailto:[hidden email]?subject=help >> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > >-- >Orbeon - XForms Everywhere: >http://www.orbeon.com/blog/ > |
Administrator
|
Ryan,
> Attached are the files required, just put them all in the same > directory and call model.xpl! I have the following in my > custom-processors.xml file > > <processor name="oxf:saxon8sa"> > <instantiation name="oxf:generic-xslt-2.0"> > <input name="transformer"> > <config> > <class>com.saxonica.SchemaAwareTransformerFactory</class> > </config> > </input> > </instantiation> > </processor> > > And the saxon8sa.jar and saxon8-dom.jar files in the lib directory! > > This should give you a empty XML document because it isn't matching the > schema-element() function! I have spent some time looking at this. The first thing is that I do not reproduce your scenario where running from the command-line works vs. running from OPS doesn't work: in both cases, I have the same behavior (it doesn't work), which makes sense to me! Some schema-aware definitely work for me, so this indicates that OPS is calling the correct version of Saxon. Those features work from within OPS as well as from the command-line. Based on this, I posted a message to saxon-help to try to figure out what I was doing wrong, with an example, and I got an answer from Mike Kay: http://sourceforge.net/mailarchive/forum.php?thread_id=11503568&forum_id=1398 I have yet to try the command-line options, but it is likely that to obtain validation of the inputs, we will have to configure Saxon to do so within OPS as well. I am still waiting for an answer from MK on this topic. So there is some progress, but we're not quite there yet. -Erik NOTE: Saxon SA requires a different Transformer factory: com.saxonica.SchemaAwareTransformerFactory instead. I have added this factory to the standard processors.xml for oxf:saxon8sa. -- Orbeon - XForms Everywhere: http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Erik,
Thanks for the update, glad your making progress Ryan Ryan Puddephatt Software Engineer TFX Group - IT UK 1 Michaelson Square Livingston West Lothian Scotand EH54 7DP * [hidden email] ( 01506 407 110 7 01506 407 108 >-----Original Message----- >From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez >Sent: 06 June 2006 18:12 >To: [hidden email] >Subject: Re: [ops-users] Schema Aware XSLT problems > >Ryan, > > > Attached are the files required, just put them all in the same > > directory and call model.xpl! I have the following in my > > custom-processors.xml file > > > > <processor name="oxf:saxon8sa"> > > <instantiation name="oxf:generic-xslt-2.0"> > > <input name="transformer"> > > <config> > > <class>com.saxonica.SchemaAwareTransformerFactory</class> > > </config> > > </input> > > </instantiation> > > </processor> > > > > And the saxon8sa.jar and saxon8-dom.jar files in the lib directory! > > > > This should give you a empty XML document because it isn't matching the > > schema-element() function! > >I have spent some time looking at this. > >The first thing is that I do not reproduce your scenario where running >from the command-line works vs. running from OPS doesn't work: in both >cases, I have the same behavior (it doesn't work), which makes sense >to me! > >Some schema-aware definitely work for me, so this indicates that OPS >is calling the correct version of Saxon. Those features work from >within OPS as well as from the command-line. > >Based on this, I posted a message to saxon-help to try to figure out >what I was doing wrong, with an example, and I got an answer from Mike >Kay: > > >http://sourceforge.net/mailarchive/forum.php?thread_id=11503568&forum_id=13 >98 > >I have yet to try the command-line options, but it is likely that to >obtain validation of the inputs, we will have to configure Saxon to do >so within OPS as well. I am still waiting for an answer from MK on >this topic. > >So there is some progress, but we're not quite there yet. > >-Erik > >NOTE: Saxon SA requires a different Transformer factory: >com.saxonica.SchemaAwareTransformerFactory instead. I have added this >factory to the standard processors.xml for oxf:saxon8sa. > >-- >Orbeon - XForms Everywhere: >http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Ryan,
I have updated the processor definition for oxf:saxon8sa to include an attribute that forces the validation of inputs by default. This may or may not be what users actually want in general, but let's see how this works for you. With this setting, my example now works and schema-element() matches ! FYI the definition is as follows, but you will get this automatically with a new build of OPS: <processor name="oxf:saxon8sa"> <instantiation name="oxf:generic-xslt-2.0"> <input name="transformer"> <config> <class>com.saxonica.SchemaAwareTransformerFactory</class> </config> </input> <input name="attributes"> <attributes xmlns:xs="http://www.w3.org/2001/XMLSchema"> <attribute as="xs:boolean" name="http://saxon.sf.net/feature/allow-external-functions" value="false"/> <!-- STRIP = 4; PRESERVE = 3; LAX = 2; STRICT = 1 --> <attribute as="xs:integer" name="http://saxon.sf.net/feature/schema-validation" value="1"/> </attributes> </input> </instantiation> </processor> You can use 1 for STRICT or 2 for LAX validation of all the inputs. Saxon SA can be hooked up to control how each input is individually validated, but that would be more work to make this possible in OPS. -Erik Ryan Puddephatt wrote: > Erik, > Thanks for the update, glad your making progress > > Ryan > > Ryan Puddephatt > Software Engineer > TFX Group - IT UK > 1 Michaelson Square > Livingston > West Lothian > Scotand > EH54 7DP > > * [hidden email] > ( 01506 407 110 > 7 01506 407 108 > > >> -----Original Message----- >> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez >> Sent: 06 June 2006 18:12 >> To: [hidden email] >> Subject: Re: [ops-users] Schema Aware XSLT problems >> >> Ryan, >> >>> Attached are the files required, just put them all in the same >>> directory and call model.xpl! I have the following in my >>> custom-processors.xml file >>> >>> <processor name="oxf:saxon8sa"> >>> <instantiation name="oxf:generic-xslt-2.0"> >>> <input name="transformer"> >>> <config> >>> <class>com.saxonica.SchemaAwareTransformerFactory</class> >>> </config> >>> </input> >>> </instantiation> >>> </processor> >>> >>> And the saxon8sa.jar and saxon8-dom.jar files in the lib directory! >>> >>> This should give you a empty XML document because it isn't matching the >>> schema-element() function! >> I have spent some time looking at this. >> >> The first thing is that I do not reproduce your scenario where running >>from the command-line works vs. running from OPS doesn't work: in both >> cases, I have the same behavior (it doesn't work), which makes sense >> to me! >> >> Some schema-aware definitely work for me, so this indicates that OPS >> is calling the correct version of Saxon. Those features work from >> within OPS as well as from the command-line. >> >> Based on this, I posted a message to saxon-help to try to figure out >> what I was doing wrong, with an example, and I got an answer from Mike >> Kay: >> >> >> http://sourceforge.net/mailarchive/forum.php?thread_id=11503568&forum_id=13 >> 98 >> >> I have yet to try the command-line options, but it is likely that to >> obtain validation of the inputs, we will have to configure Saxon to do >> so within OPS as well. I am still waiting for an answer from MK on >> this topic. >> >> So there is some progress, but we're not quite there yet. >> >> -Erik >> >> NOTE: Saxon SA requires a different Transformer factory: >> com.saxonica.SchemaAwareTransformerFactory instead. I have added this >> factory to the standard processors.xml for oxf:saxon8sa. >> >> -- >> Orbeon - XForms Everywhere: >> http://www.orbeon.com/blog/ -- Orbeon - XForms Everywhere: http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Erik,
This solves the schema-aware issue, and the XSLT now works! The problem I have now is the fact that I have a custom processor creating the input to my SA transform. When I run this as a complete set it doesn't work, but if I take the debug output of my custom processor, save it to an xml file and then use that as the input, it will work fine. Any ideas why this would be? I thought it might be because it will be streamed in to the XSLT processor and this caused a problem, normally putting a null-serializer between the two avoids this, but the problem still remains Thanks Ryan Puddephatt Software Engineer TFX Group - IT UK 1 Michaelson Square Livingston West Lothian Scotand EH54 7DP * [hidden email] ( 01506 407 110 7 01506 407 108 >-----Original Message----- >From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez >Sent: 10 June 2006 23:32 >To: [hidden email] >Subject: Re: [ops-users] Schema Aware XSLT problems > >Ryan, > >I have updated the processor definition for oxf:saxon8sa to include an >attribute that forces the validation of inputs by default. > >This may or may not be what users actually want in general, but let's >see how this works for you. With this setting, my example now works >and schema-element() matches ! FYI the definition is as follows, but >you will get this automatically with a new build of OPS: > ><processor name="oxf:saxon8sa"> > <instantiation name="oxf:generic-xslt-2.0"> > <input name="transformer"> > <config> > <class>com.saxonica.SchemaAwareTransformerFactory</class> > </config> > </input> > <input name="attributes"> > <attributes xmlns:xs="http://www.w3.org/2001/XMLSchema"> > <attribute as="xs:boolean" >name="http://saxon.sf.net/feature/allow-external-functions" value="false"/> > <!-- STRIP = 4; PRESERVE = 3; LAX = 2; STRICT = 1 --> > <attribute as="xs:integer" >name="http://saxon.sf.net/feature/schema-validation" value="1"/> > </attributes> > </input> > </instantiation> ></processor> > >You can use 1 for STRICT or 2 for LAX validation of all the inputs. > >Saxon SA can be hooked up to control how each input is individually >validated, but that would be more work to make this possible in OPS. > >-Erik > >Ryan Puddephatt wrote: > > Erik, > > Thanks for the update, glad your making progress > > > > Ryan > > > > Ryan Puddephatt > > Software Engineer > > TFX Group - IT UK > > 1 Michaelson Square > > Livingston > > West Lothian > > Scotand > > EH54 7DP > > > > * [hidden email] > > ( 01506 407 110 > > 7 01506 407 108 > > > > > >> -----Original Message----- > >> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik >Bruchez > >> Sent: 06 June 2006 18:12 > >> To: [hidden email] > >> Subject: Re: [ops-users] Schema Aware XSLT problems > >> > >> Ryan, > >> > >>> Attached are the files required, just put them all in the same > >>> directory and call model.xpl! I have the following in my > >>> custom-processors.xml file > >>> > >>> <processor name="oxf:saxon8sa"> > >>> <instantiation name="oxf:generic-xslt-2.0"> > >>> <input name="transformer"> > >>> <config> > >>> <class>com.saxonica.SchemaAwareTransformerFactory</class> > >>> </config> > >>> </input> > >>> </instantiation> > >>> </processor> > >>> > >>> And the saxon8sa.jar and saxon8-dom.jar files in the lib directory! > >>> > >>> This should give you a empty XML document because it isn't matching >the > >>> schema-element() function! > >> I have spent some time looking at this. > >> > >> The first thing is that I do not reproduce your scenario where running > >>from the command-line works vs. running from OPS doesn't work: in both > >> cases, I have the same behavior (it doesn't work), which makes sense > >> to me! > >> > >> Some schema-aware definitely work for me, so this indicates that OPS > >> is calling the correct version of Saxon. Those features work from > >> within OPS as well as from the command-line. > >> > >> Based on this, I posted a message to saxon-help to try to figure out > >> what I was doing wrong, with an example, and I got an answer from Mike > >> Kay: > >> > >> > >> >http://sourceforge.net/mailarchive/forum.php?thread_id=11503568&forum_id=13 > >> 98 > >> > >> I have yet to try the command-line options, but it is likely that to > >> obtain validation of the inputs, we will have to configure Saxon to do > >> so within OPS as well. I am still waiting for an answer from MK on > >> this topic. > >> > >> So there is some progress, but we're not quite there yet. > >> > >> -Erik > >> > >> NOTE: Saxon SA requires a different Transformer factory: > >> com.saxonica.SchemaAwareTransformerFactory instead. I have added this > >> factory to the standard processors.xml for oxf:saxon8sa. > >> > >> -- > >> Orbeon - XForms Everywhere: > >> http://www.orbeon.com/blog/ > >-- >Orbeon - XForms Everywhere: >http://www.orbeon.com/blog/ > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Ryan Puddephatt wrote:
> This solves the schema-aware issue, and the XSLT now works! Great! > The problem I have now is the fact that I have a custom processor > creating the input to my SA transform. When I run this as a complete > set it doesn't work, but if I take the debug output of my custom > processor, save it to an xml file and then use that as the input, it > will work fine. Any ideas why this would be? Likely that the SAX stream is incorrect ;-) How do you produce your processor output? > I thought it might be because it will be streamed in to the XSLT > processor and this caused a problem, normally putting a > null-serializer between the two avoids this, but the problem still > remains Streaming should not have any incidence, since between OPS processors you always have streaming anyway. But sometimes inserting a component may fix a broken SAX stream. -Erik -- Orbeon - XForms Everywhere: http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Erik,
> > > This solves the schema-aware issue, and the XSLT now works! > >Great! > > > The problem I have now is the fact that I have a custom processor > > creating the input to my SA transform. When I run this as a complete > > set it doesn't work, but if I take the debug output of my custom > > processor, save it to an xml file and then use that as the input, it > > will work fine. Any ideas why this would be? > >Likely that the SAX stream is incorrect ;-) How do you produce your >processor output? send you the java file(s) if you want > > > I thought it might be because it will be streamed in to the XSLT > > processor and this caused a problem, normally putting a > > null-serializer between the two avoids this, but the problem still > > remains > >Streaming should not have any incidence, since between OPS processors >you always have streaming anyway. But sometimes inserting a component >may fix a broken SAX stream. Ryan Puddephatt Software Engineer TFX Group - IT UK 1 Michaelson Square Livingston West Lothian Scotand EH54 7DP * [hidden email] ( 01506 407 110 7 01506 407 108 -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Ryan Puddephatt wrote:
> Erik, > >>> This solves the schema-aware issue, and the XSLT now works! >> Great! >> >>> The problem I have now is the fact that I have a custom processor >>> creating the input to my SA transform. When I run this as a complete >>> set it doesn't work, but if I take the debug output of my custom >>> processor, save it to an xml file and then use that as the input, it >>> will work fine. Any ideas why this would be? >> Likely that the SAX stream is incorrect ;-) How do you produce your >> processor output? > > I use the sax ContentHandler and the OPS ContentHandlerHelper class, I can > send you the java file(s) if you want If so, can you also try to hook-up the oxf:sax-debugger processor on your output and send the results that will be logged? -Erik -- Orbeon - XForms Everywhere: http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Erik,
A small example isn't really possible because of the java files required for the processor, but I have a file appender dump (attached) with the sax-debugger running. Thanks Ryan Ryan Puddephatt Software Engineer TFX Group - IT UK 1 Michaelson Square Livingston West Lothian Scotand EH54 7DP * [hidden email] ( 01506 407 110 7 01506 407 108 >-----Original Message----- >From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez >Sent: 14 June 2006 19:28 >To: [hidden email] >Subject: Re: [ops-users] Schema Aware XSLT problems > >Ryan Puddephatt wrote: >> Erik, >> >>>> This solves the schema-aware issue, and the XSLT now works! >>> Great! >>> >>>> The problem I have now is the fact that I have a custom processor >>>> creating the input to my SA transform. When I run this as a complete >>>> set it doesn't work, but if I take the debug output of my custom >>>> processor, save it to an xml file and then use that as the input, it >>>> will work fine. Any ideas why this would be? >>> Likely that the SAX stream is incorrect ;-) How do you produce your >>> processor output? >> >> I use the sax ContentHandler and the OPS ContentHandlerHelper class, I >can >> send you the java file(s) if you want > >Sure. Can you reproduce the issue with a document as small as possible? >If so, can you also try to hook-up the oxf:sax-debugger processor on >your output and send the results that will be logged? > >-Erik > >-- >Orbeon - XForms Everywhere: >http://www.orbeon.com/blog/ oxf.log (59K) Download Attachment |
Administrator
|
FYI we solved this issue by fixing problems with the SAX stream.
In particular, there were some undeclared default namespaces, and some inconsistencies between localname and QName on attributes. There is now a new processor, oxf:sax-inspector, which you can hook-up in a pipeline and should catch a number of issues with SAX streams (but not all issues yet). -Erik Ryan Puddephatt wrote: > Erik, > A small example isn't really possible because of the java files > required for the processor, but I have a file appender dump (attached) with > the sax-debugger running. > > Thanks > > Ryan > > Ryan Puddephatt > Software Engineer > TFX Group - IT UK > 1 Michaelson Square > Livingston > West Lothian > Scotand > EH54 7DP > > * [hidden email] > ( 01506 407 110 > 7 01506 407 108 > > >> -----Original Message----- >> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez >> Sent: 14 June 2006 19:28 >> To: [hidden email] >> Subject: Re: [ops-users] Schema Aware XSLT problems >> >> Ryan Puddephatt wrote: >>> Erik, >>> >>>>> This solves the schema-aware issue, and the XSLT now works! >>>> Great! >>>> >>>>> The problem I have now is the fact that I have a custom processor >>>>> creating the input to my SA transform. When I run this as a complete >>>>> set it doesn't work, but if I take the debug output of my custom >>>>> processor, save it to an xml file and then use that as the input, it >>>>> will work fine. Any ideas why this would be? >>>> Likely that the SAX stream is incorrect ;-) How do you produce your >>>> processor output? >>> I use the sax ContentHandler and the OPS ContentHandlerHelper class, I >> can >>> send you the java file(s) if you want >> Sure. Can you reproduce the issue with a document as small as possible? >> If so, can you also try to hook-up the oxf:sax-debugger processor on >> your output and send the results that will be logged? >> >> -Erik >> >> -- >> Orbeon - XForms Everywhere: >> http://www.orbeon.com/blog/ >> >> ------------------------------------------------------------------------ >> >> >> -- >> You receive this message as a subscriber of the [hidden email] mailing list. >> To unsubscribe: mailto:[hidden email] >> For general help: mailto:[hidden email]?subject=help >> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws -- Orbeon - XForms Everywhere: http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |