Schematron, XPath 2.0, "fn" prefix
Oxygen general issues.
-
- Posts: 3
- Joined: Wed Oct 17, 2007 11:18 am
Schematron, XPath 2.0, "fn" prefix
Hi,
I'm trying to use an XPath 2.0 (regular expression) function, and I'm seeming to have a problem with the supposedly optional namespace "fn" when I try to validate Schematron. The error message I get is:
I've tried it with and without the namespaces, whether in <schema>, <ns>, or within assert@test... I've also specified in the options that I want XPath 2.0, and it's showing up as 2.0 in the toolbar. Any ideas of what I need to do?
I'm trying to use an XPath 2.0 (regular expression) function, and I'm seeming to have a problem with the supposedly optional namespace "fn" when I try to validate Schematron. The error message I get is:
Code: Select all
The URI http://www.w3.org/2003/11/xpath-functions does not identify an external Java class
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://purl.oclc.org/dsdl/schematron" xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:fn="http://www.w3.org/2003/11/xpath-functions">
<ns prefix="tei" uri="http://www.tei-c.org/ns/1.0" />
<ns prefix="fn" uri="http://www.w3.org/2003/11/xpath-functions" />
<pattern id="Bahai_Date">
<rule context="tei:date/@calendar">
<assert test="fn:matches(., 'Bahai')">The date's calendar should be set to "Baha'i"</assert>
</rule>
</pattern>
</schema>
-
- Posts: 3
- Joined: Wed Oct 17, 2007 11:18 am
Hi,
Sorry, nevermind, I found the answer here: http://www.oxygenxml.com/forum/viewtopi ... b8f38f5d45
I also discovered that one should not use the namespace bindings in scope for the elements and attributes on the assert evaluations (as I tried to do on the <schema> element), but should only use those on <ns>.
(And, my rule context was inappropriate to be used with '.'.)
thanks,
Brett
Sorry, nevermind, I found the answer here: http://www.oxygenxml.com/forum/viewtopi ... b8f38f5d45
I also discovered that one should not use the namespace bindings in scope for the elements and attributes on the assert evaluations (as I tried to do on the <schema> element), but should only use those on <ns>.
(And, my rule context was inappropriate to be used with '.'.)
thanks,
Brett
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