Search found 219 matches

by tavy
Tue Apr 04, 2017 9:33 am
Forum: XML Schemas
Topic: assert test can't find node
Replies: 3
Views: 2450

Re: assert test can't find node

Hello, The namespace scope of the path elements in the assertion expression is determined by the value of the xpathDefaultNamespace attribute. If the attribute is absent, its value is assumed to be ##local - which translates into null namespace. This attribute can also be declared to hold any URI, o...
by tavy
Mon Apr 03, 2017 3:07 pm
Forum: XML Schemas
Topic: assert test can't find node
Replies: 3
Views: 2450

Re: assert test can't find node

Hello,

You need to add a namespace declaration on you schema root, something like this: xmlns:b="http://magazine.babson.edu"
Then change the assert to use the declared prefix, something like this: <xs:assert test="b:type='Undergraduate'"/>

Best Regards,
Octavian
by tavy
Tue Mar 28, 2017 4:00 pm
Forum: XML Schemas
Topic: Validate multiple root elements with Schematron
Replies: 4
Views: 2562

Re: Validate multiple root elements with Schematron

Hello, Unfortunately I cannot reproduce the problem. For me it works fine. If I validate the following XML with the Schematron that you provided I get both errors, on "office:Date" and "staff:Available". The only thing that I can think of is to have a different namespace URI for the "staff" in the X...
by tavy
Tue Mar 28, 2017 9:00 am
Forum: XML Schemas
Topic: Validate multiple root elements with Schematron
Replies: 4
Views: 2562

Re: Validate multiple root elements with Schematron

Hello, You need to send me also a sample Schematron file in order to find the problem. Is the Schematron embedded in XSD or is in a separate file? Are the rules in different patterns, and you use phases? Make sure that the namepaces for the "office" and "staff" are declared correctly in the Schematr...
by tavy
Thu Mar 23, 2017 12:20 pm
Forum: Other Issues
Topic: Grouping Schematron Messages
Replies: 1
Views: 1110

Re: Grouping Schematron Messages

Hi Patrick, Thank you for the feedback . We have not received such requirements until now. In the Problems view you get errors from different schemas, and such a filter will apply only for Schematron errors. Therefore, we need to present this group only if there are Schematron errors in the view. We...
by tavy
Mon Mar 20, 2017 6:55 pm
Forum: General XML Questions
Topic: Unwanted namespace declarations in sqf/xsl output
Replies: 2
Views: 1595

Re: Unwanted namespace declarations in sqf/xsl output

Hello, Unfortunately I didn't found a solution for this problem. It seems that the serializer that we use in oXygen when we create the fragment to be inserted, generates also the XML namespace declaration. I added an issue on our issue tracker. We will notify you when it will be fixed. Best Regards,...
by tavy
Mon Mar 13, 2017 6:21 pm
Forum: Common Problems
Topic: XSLT instructions inside Schematron are working fine, but are they supposed to at all?
Replies: 1
Views: 1368

Re: XSLT instructions inside Schematron are working fine, but are they supposed to at all?

Hello Ron, The Schematron specification does not mention that you can use XSLT in Schematron. But Schematron was designed somehow to use XSLT. The reference implementation uses XSLT: http://schematron.com/front-page/the-schematron-skeleton-implementation Therefore, the use of XSLT in Schematron is i...
by tavy
Wed Mar 08, 2017 6:15 pm
Forum: General XML Questions
Topic: Need workaround for lookarounds in XPATH regex
Replies: 3
Views: 1783

Re: Need workaround for lookarounds in XPATH regex

Hello, In <oXygen/> XML Editor 18.1 we updated the sqf:stringReplace operation to allow using Java regular expressions. The Saxon "j" flag is automatically set for the regular expressions of the sqf:stringReplace operation. You can read more about this in our user manual: https://www.oxygenxml.com/d...
by tavy
Mon Jan 23, 2017 10:03 am
Forum: XSLT and FOP
Topic: string-length excluding child element content
Replies: 1
Views: 1253

Re: string-length excluding child element content

Hello, The XPath expression that you used in the assertion excludes the children elements, but you need to exclude the whitespaces when you count the string length of the text node. For this you can use the "normalize-space()" function, something like: <sch:assert test="string-length(normalize-space...
by tavy
Thu Jan 19, 2017 10:31 am
Forum: XML Schemas
Topic: Schematron rules for NIEM association elements
Replies: 4
Views: 2178

Re: Schematron rules for NIEM association elements

Hello, If you have a rule with the context set on the "nc:Activity" element, you can execute an XPath expression that will get all activity associations that have the current activity id "//mine:ActivitySubjectAssociation[nc:Activity/@s:ref = $id]". Then from the association you can access the perso...
by tavy
Fri Jan 13, 2017 6:03 pm
Forum: XML Schemas
Topic: Schematron rules for NIEM association elements
Replies: 4
Views: 2178

Re: Schematron rules for NIEM association elements

Hello, I don't understand exactly what you want to check. Maybe you can give me some real examples, how many persons can be associated with an activity, or how many activities can be associated with a person, maybe you have a schema for the XML file. If you want to check for example if the persons o...
by tavy
Mon Dec 19, 2016 2:55 pm
Forum: XSLT and FOP
Topic: Schematron to comment out a set of nodes
Replies: 4
Views: 2190

Re: Schematron to comment out a set of nodes

Hello, According to the SQF Specification , the content of the replace operation has the same functionality as the content of xsl:template element. The problem is that in XSLT when a comment is generated its content must be only text. XSLT Specification says: "It is an error if instantiating the con...
by tavy
Wed Dec 14, 2016 1:49 pm
Forum: XSLT and FOP
Topic: Schematron to find plural keywords
Replies: 4
Views: 1884

Re: Schematron to find plural keywords

Hello, You can create a Schematron rule that matches the keyword element, and check that the text after the element does not start with the 's' character. The rule will be something like this: <sch:rule context="keyword[@keyref]"> <sch:report test="following-sibling::node()[1][self::text()][starts-w...
by tavy
Mon Dec 12, 2016 11:29 am
Forum: XSLT and FOP
Topic: Get username
Replies: 3
Views: 3077

Re: Get username

Hello, Yes, you can obtain the current user name also in Schemtron. You have two solutions: The first one is to use the "system-property()" function, something like this: <xsl:value-of select="system-property('user.name')"/> We are using Saxon processor to validate an XML with a Schematron schema, a...
by tavy
Thu Oct 20, 2016 5:18 pm
Forum: SDK-API, Frameworks - Document Types
Topic: Access to ExtensionBundle from XSLT/Schematron
Replies: 4
Views: 3235

Re: Access to ExtensionBundle from XSLT/Schematron

Hi Patrik, In oXygen 18.1 we added support in the validation scenario to specify extension JARs for the Schematron documents validation, and for the validation of XML documents against Schematron. In the Specify Schema dialog box there is an Extensions button that opens a dialog box and allows you t...
by tavy
Fri Jul 22, 2016 8:58 am
Forum: DITA (Editing and Publishing DITA Content)
Topic: SQF preferences
Replies: 3
Views: 838

Re: SQF preferences

Hi Nicholas, Thanks for your feedback. I added an issue on our issue tracker to find a solution for this. The problem is that the Schematron error/warning must be ignored based on the assert/report message, and I don't know if this is accurate. If the Schematron developer uses the same message for a...
by tavy
Thu Jul 21, 2016 8:58 am
Forum: DITA (Editing and Publishing DITA Content)
Topic: SQF preferences
Replies: 3
Views: 838

Re: SQF preferences

Hello, We do not have such an option in oXygen XML Editor. But you can move the rules that you want to ignore in a separate Schematron file. In this way you can just remove that Schematron file from the validation scenario, or create a different validation scenario for the users that want to ignore ...
by tavy
Tue Jul 19, 2016 4:51 pm
Forum: DITA (Editing and Publishing DITA Content)
Topic: characters between two characters
Replies: 1
Views: 1234

Re: characters between two characters

Hello, You can use the "substring-before()" and "substring-after()" functions to get the characters that you want, as in the following example: <xsl:variable name="var" select="'1313-231-546'"/> <xsl:variable name="value" select="substring-after($var, '-')"/> <xsl:variable name="no1" select="substri...
by tavy
Thu Jul 14, 2016 2:21 pm
Forum: DITA (Editing and Publishing DITA Content)
Topic: Representing all alphabets in a string
Replies: 1
Views: 464

Re: Representing all alphabets in a string

Hello, Because you are using Schematron with XSLT 1.0, you cannot apply a regular expressions to match a string. A solution for XSLT 1.0 to check is if lower case alphabets and digits are used in a text is to use the translate(). Something like in the following example: <sch:let name="vLower" value=...
by tavy
Mon Jul 11, 2016 3:25 pm
Forum: XSLT and FOP
Topic: Schematron sqf:stringReplace case-insensitive
Replies: 5
Views: 2793

Re: Schematron sqf:stringReplace case-insensitive

Hello, You cannot pass the ignore case flag in the stringReplace operation. I will add an issue on the SQF specification to add this support. As an workaround you can use the "sqf:replace" operation instead and the "xsl:analyze-string" instruction. Something like this: <sqf:replace> <xsl:analyze-str...
by tavy
Mon May 16, 2016 3:55 pm
Forum: XML Schemas
Topic: Unable to use variable in href for sch:include
Replies: 1
Views: 1871

Re: Unable to use variable in href for sch:include

Hello, Yes, it is not possible to use a variable in the value of the href attribute of an include element. The value of the href attribute must be an URI reference. More information about Schematron you can find on http://www.schematron.com/ website. ISO Schematron specification: http://www.schematr...
by tavy
Tue May 10, 2016 12:39 pm
Forum: XML Schemas
Topic: Looping in schematron
Replies: 1
Views: 2510

Re: Looping in schematron

Hi Shabeer, You need to determine each line of text from your "pre" element and check its length. I have created a sample for you using XSLT to determine the lines of text. You can find the sample below: <sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2" xmlns:xsl="htt...
by tavy
Thu May 05, 2016 9:44 am
Forum: Common Problems
Topic: Exclude specific tag with Diff Directories
Replies: 2
Views: 1537

Re: Exclude specific tag with Diff Directories

Hello, In oXygen XML Editor 18 we added support in Diff Files tool to ignore nodes using an XPath expression. An XPath panel was added on the toolbar of the File Comparison tool and in the Compare view in the Syncro SVN Client. You can enter an XPath 2.0 expression to ignore certain nodes when compa...
by tavy
Thu May 05, 2016 9:30 am
Forum: Feature Request
Topic: Diff Files and Dirs: Add Ignore set of nodes defined by the XPath for XML documents
Replies: 11
Views: 4071

Re: Diff Files and Dirs: Add Ignore set of nodes defined by the XPath for XML documents

Hello, In oXygen XML Editor 18 we added support in Diff Files tool to ignore nodes using an XPath expression. An XPath panel was added on the toolbar of the File Comparison tool and in the Compare view in the Syncro SVN Client. You can enter an XPath 2.0 expression to ignore certain nodes when compa...
by tavy
Wed May 04, 2016 4:47 pm
Forum: Feature Request
Topic: Pluggable diff/file comparison algorithms
Replies: 6
Views: 2673

Re: Pluggable diff/file comparison algorithms

Hello, In oXygen XML Editor 18 we added support to ignore nodes using an XPath expression. An XPath panel was added on the toolbar of the File Comparison tool and in the Compare view in the Syncro SVN Client. You can enter an XPath 2.0 expression to ignore certain nodes when comparing using the XML ...
by tavy
Tue Apr 26, 2016 2:53 pm
Forum: General XML Questions
Topic: RELAX NG with Embedded Schematron
Replies: 9
Views: 3483

Re: RELAX NG with Embedded Schematron

Hello, If you want the error to be displayed on the "floatfig" element when the @float attribute is not "none" and you do not have the "floatfig-group" as child then you need to change the assert. Instead of <sch:assert test="(string(@float) ne 'none') and exists(child::floatfig-group)"> You should ...
by tavy
Tue Apr 26, 2016 9:56 am
Forum: XML Schemas
Topic: SQF for keydef + topicref attributes
Replies: 3
Views: 3001

Re: SQF for keydef + topicref attributes

Hello Nick, The assert for the "keydef/@processing-role" attribute does not work because the default value for the "processing-role" attribute is "resource-only". When the XML is validated against Schematron you cannot determine if the attribute is set in document or is just the default value from t...
by tavy
Mon Apr 18, 2016 2:20 pm
Forum: Common Problems
Topic: Exclude specific tag with Diff Directories
Replies: 2
Views: 1537

Re: Exclude specific tag with Diff Directories

Hello, In oXygen XML Editor 18.0 (that will be released probably at the end of this moth) we added support to ignore nodes by XPath but only for the file comparison ("Diff Files"). We have an issue on our issue tracker to implement this also for "Diff Directories". But this is scheduled for a future...
by tavy
Fri Apr 15, 2016 10:42 am
Forum: XML Schemas
Topic: Schematron - using variables in XPATH
Replies: 2
Views: 3953

Re: Schematron - using variables in XPATH

Hello, I corrected your Schematron schema, you can find it below. You made some small mistakes: - in the 'qualifierValue' variable the $refValue should not be in apostrophes, instead of @value='$refValue' use @value=$refValue. - in the assert you need to use apostrophes for documentType, instead of ...
by tavy
Mon Mar 14, 2016 1:41 pm
Forum: Feature Request
Topic: Support for ISO Schematron subject attribute
Replies: 3
Views: 3446

Re: Support for ISO Schematron subject attribute

Hello,

Yes, we do not support variables in the value of the @subject attribute. You can use an XPath expression that does not contain variables.
I added an issue on our issue tracker regarding this problem. We will notify you when it will be solved.

Best Regards,
Octavian