oxygen giving incorrect syntax error for xproc?
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 3
- Joined: Thu Jul 19, 2018 9:51 pm
oxygen giving incorrect syntax error for xproc?
Hello,
I am using Roger Costello's XProc tutorial. Things were going fine until I got to his examples for validate-with-schematron. Oxygen is showing an error for the parameters ports.
The error message is: attribute "sequence" not allowed here; expected attribute "select", "use-when", "xml-base" or xml:id" or an attribute from another namespace.
I looked at the specification on the w3 site and it shows the parameters port as having an attribute called "kind" (not "sequence"). When I substitute "kind" for "sequence", I get a similar error. I don't know if "kind" is a true syntax error or if oXygen is making a mistake. I'm also not sure how to find out.
Thanks for any guidance you can give me.
Regards,
Paten
I am using Roger Costello's XProc tutorial. Things were going fine until I got to his examples for validate-with-schematron. Oxygen is showing an error for the parameters ports.
Code: Select all
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc">
<p:input port="source">
<p:document href="document.xml"/>
</p:input>
<p:output port="result">
<p:pipe step="checkReservedWords" port="result"/>
</p:output>
<p:validate-with-schematron phase="classificationValidation" name="checkClassifications">
<p:input port="schema">
<p:document href="check-classifications-and-reserved-words.sch"/>
</p:input>
<p:input port="parameters" sequence="true">
<p:empty/>
</p:input>
</p:validate-with-schematron>
<p:validate-with-schematron phase="reservedWordValidation" name="checkReservedWords">
<p:input port="source">
<p:pipe step="checkClassifications" port="result" />
</p:input>
<p:input port="schema">
<p:document href="check-classifications-and-reserved-words.sch"/>
</p:input>
<p:input port="parameters" sequence="true">
<p:empty/>
</p:input>
</p:validate-with-schematron>
</p:declare-step>
I looked at the specification on the w3 site and it shows the parameters port as having an attribute called "kind" (not "sequence"). When I substitute "kind" for "sequence", I get a similar error. I don't know if "kind" is a true syntax error or if oXygen is making a mistake. I'm also not sure how to find out.
Thanks for any guidance you can give me.
Regards,
Paten
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: oxygen giving incorrect syntax error for xproc?
Hi Paten,
We are not very familiar with the XProc standard as we do not use it much internally.
By default Oxygen uses a Relax NG schema to validate XProc documents. If you create a transformation scenario of type "XProc" for your XProc file, and then validate the XProc file again, then Oxygen will directly use the Calabash XProc engine for validation and indeed this engine no longer reports the problems you found.
I'll add an issue on our side to see if we can update the RNG schema we use by default for XProc validation so that such problems are no longer reported.
There is also an XProc developers list to which you could register and ask XProc-related questions:
https://xmlcalabash.com/
Regards,
Radu
We are not very familiar with the XProc standard as we do not use it much internally.
By default Oxygen uses a Relax NG schema to validate XProc documents. If you create a transformation scenario of type "XProc" for your XProc file, and then validate the XProc file again, then Oxygen will directly use the Calabash XProc engine for validation and indeed this engine no longer reports the problems you found.
I'll add an issue on our side to see if we can update the RNG schema we use by default for XProc validation so that such problems are no longer reported.
There is also an XProc developers list to which you could register and ask XProc-related questions:
https://xmlcalabash.com/
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: oxygen giving incorrect syntax error for xproc?
Hi,
Looking more at the Relax NG schemas developed by Norman Walsh that Oxygen uses by default for validation, it seems that those two attributes are allowed when you have an input declaration like for example:
but not when you have a connection to an existing input (which is your case).
I will try to get Norman Walsh (the creator of the Calabash XProc engine and member of the XProc committee) to give us some feedback on this one.
Regards,
Radu
Looking more at the Relax NG schemas developed by Norman Walsh that Oxygen uses by default for validation, it seems that those two attributes are allowed when you have an input declaration like for example:
Code: Select all
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="1.0">
<p:input port="source" sequence="true">
<p:document href="document.xml"/>
</p:input>
</p:declare-step>
I will try to get Norman Walsh (the creator of the Calabash XProc engine and member of the XProc committee) to give us some feedback on this one.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 2
- Joined: Wed Aug 08, 2018 11:52 pm
Re: oxygen giving incorrect syntax error for xproc?
Hi,
Oxygen support asked me to chime in. Perhaps Roger's tutorial is out-of-date. I confess I haven't looked at it recently. The attributes 'kind', 'sequence', and 'primary' are only allowed on the declarations of steps, not on invocations of those steps. (If you declare that a port accepts a sequence, then every instance of that port on that step accepts a sequence.)
In your example, if you simply remove @sequence from the two uses in <p:validate-with-schematron>, your pipeline will be valid and will behave correctly.
If XML Calabash doesn't give you an error for those extraneous attributes, that's a bug in XML Calabash.
Hope that's helpful.
P.S. In the next version of XProc, we've changed the element names. You use p:input on the declaration and p:with-input on the invocation. (Parallel to p:option and p:with-option.) We hope that simplifies things.
Oxygen support asked me to chime in. Perhaps Roger's tutorial is out-of-date. I confess I haven't looked at it recently. The attributes 'kind', 'sequence', and 'primary' are only allowed on the declarations of steps, not on invocations of those steps. (If you declare that a port accepts a sequence, then every instance of that port on that step accepts a sequence.)
In your example, if you simply remove @sequence from the two uses in <p:validate-with-schematron>, your pipeline will be valid and will behave correctly.
If XML Calabash doesn't give you an error for those extraneous attributes, that's a bug in XML Calabash.
Hope that's helpful.
P.S. In the next version of XProc, we've changed the element names. You use p:input on the declaration and p:with-input on the invocation. (Parallel to p:option and p:with-option.) We hope that simplifies things.
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: oxygen giving incorrect syntax error for xproc?
Hi Norman,
Thanks for the explanations, I added an issue on the Calabash issues list in order to have a record for this:
https://github.com/ndw/xmlcalabash1/issues/279
Oh, and I also wrote to Roger Costello to check out this thread, maybe he can update the tutorial on his side.
Regards,
Radu
Thanks for the explanations, I added an issue on the Calabash issues list in order to have a record for this:
https://github.com/ndw/xmlcalabash1/issues/279
Oh, and I also wrote to Roger Costello to check out this thread, maybe he can update the tutorial on his side.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service