error in schematron
This should cover W3C XML Schema, Relax NG and DTD related problems.
-
- Posts: 5
- Joined: Tue Sep 03, 2013 5:39 pm
error in schematron
Post by touch.rajasekar »
Hi Team,
when i try to validate the my xml into schematron. It's throw the following error.
"The value is not a node-set"
It's validate against the DTD and other schematron validation also succeed.
I am not sure what error i did in my xml.
please help me to sort the problem.
Thanks in Advance
Rajasekar
when i try to validate the my xml into schematron. It's throw the following error.
"The value is not a node-set"
It's validate against the DTD and other schematron validation also succeed.
I am not sure what error i did in my xml.
please help me to sort the problem.
Thanks in Advance
Rajasekar
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: error in schematron
Hello,
You'll have to provide more details about the context of the error.
Regards,
Adrian
This is a generic error that is usually reported when the result of an XPath is an atomic value instead of the node-set expected in that context."The value is not a node-set"
You'll have to provide more details about the context of the error.
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 5
- Joined: Tue Sep 03, 2013 5:39 pm
Re: error in schematron
Post by touch.rajasekar »
Hi Adrian,
Thanks for your reply. i will check my file and get back.
thanks
Rajasekar
Thanks for your reply. i will check my file and get back.
thanks
Rajasekar
-
- Posts: 5
- Joined: Tue Sep 03, 2013 5:39 pm
Re: error in schematron
Post by touch.rajasekar »
Hi Adrian,
While checking my schematron, i found that the following syntax have error. If i remove the below coding from schema. The xml has validated successfully.
SCHEMATRON:
<pattern id="disp-formula">
<rule context="//disp-formula">
<assert test="@content-type='numbered' | @content-type='unnumbered'">FATAL WARNING!!!! Display formulae must be either numbered or unnumbered.</assert>
</rule>
</pattern>
XML
<disp-formula id="M0001" content-type="numbered">
<label>1</label>
<alternatives>
<graphic xlink:href="Math/M0001.jpg"/>
<mml:math display="block">
<mml:mrow>
<mml:mi>P</mml:mi>
<mml:mo>=</mml:mo>
<mml:mn>0.5</mml:mn>
<mml:mo>·</mml:mo>
<mml:mi>ρ</mml:mi>
<mml:mo>·</mml:mo>
</mml:mrow>
</mml:math>
<tex-math notation="LaTeX" version="MathJax">
<![CDATA[
\usepackage\{}
\begin{document}
[\[ P=0.5\middot \rho \middot \]]
\end{document}
]]>
</tex-math>
</alternatives>
</disp-formula>
Could you please help me any error in the syntax?
Thanks
Rajasekar
While checking my schematron, i found that the following syntax have error. If i remove the below coding from schema. The xml has validated successfully.
SCHEMATRON:
<pattern id="disp-formula">
<rule context="//disp-formula">
<assert test="@content-type='numbered' | @content-type='unnumbered'">FATAL WARNING!!!! Display formulae must be either numbered or unnumbered.</assert>
</rule>
</pattern>
XML
<disp-formula id="M0001" content-type="numbered">
<label>1</label>
<alternatives>
<graphic xlink:href="Math/M0001.jpg"/>
<mml:math display="block">
<mml:mrow>
<mml:mi>P</mml:mi>
<mml:mo>=</mml:mo>
<mml:mn>0.5</mml:mn>
<mml:mo>·</mml:mo>
<mml:mi>ρ</mml:mi>
<mml:mo>·</mml:mo>
</mml:mrow>
</mml:math>
<tex-math notation="LaTeX" version="MathJax">
<![CDATA[
\usepackage\{}
\begin{document}
[\[ P=0.5\middot \rho \middot \]]
\end{document}
]]>
</tex-math>
</alternatives>
</disp-formula>
Could you please help me any error in the syntax?
Thanks
Rajasekar
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: error in schematron
Hi,
I don't have your full context, so this may be different for you, but when I tested this, I got an error because of the assert expression:
I replaced in the assert expression the '|' character with a logical 'or' and then it worked fine:
'|' composes a single node-set from two nodes or node-sets, but this is not what the expression from this assert was supposed to do.
Regards,
Adrian
I don't have your full context, so this may be different for you, but when I tested this, I got an error because of the assert expression:
Code: Select all
XPTY0004: Required item type of first operand of '|' is node(); supplied value has item type xs:string
Code: Select all
<assert test="@content-type='numbered' or @content-type='unnumbered'">FATAL WARNING!!!! Display formulae must be either numbered or unnumbered.</assert>
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 5
- Joined: Tue Sep 03, 2013 5:39 pm
Re: error in schematron
Post by touch.rajasekar »
Hi Adrian,
Thanks a lot.
After changed the expression its working fine.
thanks
Rajasekar
Thanks a lot.
After changed the expression its working fine.
thanks
Rajasekar
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ 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