Search found 202 matches

by tavy
Tue Aug 08, 2017 10:52 am
Forum: General XML Questions
Topic: Unique combination of element / attribute value in schematron
Replies: 1
Views: 1471

Re: Unique combination of element / attribute value in schematron

Hello, You can create a rule that for each languageSpecificBrandName element verifies that there is no previous sibling with the same name and language code. The rule must be something like this: <sch:rule context="languageSpecificBrandName"> <sch:let name="currentLang" value="@language"/> <sch:let ...
by tavy
Thu Aug 03, 2017 4:33 pm
Forum: XML Schemas
Topic: Schematron - Counting number of elements+attributes
Replies: 2
Views: 2710

Re: Schematron - Counting number of elements+attributes

Hello, You can create a rule for the description element that checks the number of functionalName elements that have the @languageCode equal with 'en', something like this: <sch:pattern> <sch:rule context="description"> <sch:assert test="count(functionalName[@languageCode= 'en']) = 1">The value of T...
by tavy
Wed Aug 02, 2017 8:53 am
Forum: Common Problems
Topic: "Ignore nodes by Xpath" in Compare Directories
Replies: 4
Views: 1635

Re: "Ignore nodes by Xpath" in Compare Directories

Hello Paul, The "Ignore nodes by Xpath" option is available only for Diff Files. We do not have support in Diff Directories to merge the contents of the files and ignore some nodes. The only way to merge the contents of the files and ignore nodes is by using the Diff Files. I will add an issue on ou...
by tavy
Tue Jul 25, 2017 11:06 am
Forum: DITA (Editing and Publishing DITA Content)
Topic: Wrapping text() with a Quick Fix not working as expected. Why?
Replies: 2
Views: 947

Re: Wrapping text() with a Quick Fix not working as expected. Why?

Hello, Thank you for the feedback. It seems that we do not compute the context node correctly in this case. The context node for the insert element operation should be the text node and the quick fix must insert the element after the text node, not after the section. I added an issue on out issue tr...
by tavy
Mon Jul 10, 2017 3:24 pm
Forum: DITA (Editing and Publishing DITA Content)
Topic: Starting with Schematron
Replies: 13
Views: 5396

Re: Starting with Schematron

Hi Ann, This happens because the elements that you are inserting using the quick fix are from the Schematron namespace. The Schematron namespace is defined on the schema root as the default namespace for your document (xmlns="http://purl.oclc.org/dsdl/schematron"), and because you did not specify a ...
by tavy
Fri Jul 07, 2017 11:50 am
Forum: General XML Questions
Topic: @rowspan not found by Schematron rule in oXygen
Replies: 3
Views: 1281

Re: @rowspan not found by Schematron rule in oXygen

Hello, Yes, you can use th[@rowspan='2']. For me it works fine. You can also report a problem only when the value of the rowspan is different from the default one. Something like this: <sch:rule context="th[@rowspan!='1']"> <sch:report test="true()">Don't use the rowspan attribute</sch:report> </sch...
by tavy
Tue Jun 20, 2017 3:24 pm
Forum: Common Problems
Topic: Validating dates in schematron
Replies: 1
Views: 1305

Re: Validating dates in schematron

Hello, You can convert to 'xs:date' and compare the dates. To obtain the dateA you need to get the previous sibling using the following XPath 'preceding-sibling::dateA[1]', and then decrease one day to obtain the expected date. You can provide also a fix that will correct the current date. The Schem...
by tavy
Wed May 10, 2017 8:43 am
Forum: Common Problems
Topic: Schermatron: matching element element content with other element name
Replies: 1
Views: 871

Re: Schermatron: matching element element content with other element name

Hello, For the example that you provided You need to create a Schematron something like this: <sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2"> <sch:pattern> <sch:rule context="element1"> <sch:let name="matchElemName" value="following-sibling::*[1]/child::*[2]/local-...
by tavy
Tue May 09, 2017 4:18 pm
Forum: Other Issues
Topic: Formatting results in the "Results pane"
Replies: 4
Views: 1549

Re: Formatting results in the "Results pane"

Hello Grethel, The solution that I can think of is to use abstract patterns. You can create an abstract pattern with the report, and instantiate this pattern for each forbidden word with some specific parameters (the forbidden word, the replace word, maybe a different message). In the abstract patte...
by tavy
Tue May 02, 2017 4:50 pm
Forum: Other Issues
Topic: Formatting results in the "Results pane"
Replies: 4
Views: 1549

Re: Formatting results in the "Results pane"

Hello Grethel, A solution is to change the message and add the text "This word should not be used:" only once. Something like this: <xsl:variable name="list-words"> <xsl:for-each select="document('list_of_words.dita')//tbody/row/entry[1]"> <xsl:variable name="word" select="."/> <xsl:if test="matches...
by tavy
Thu Apr 20, 2017 3:13 pm
Forum: XSLT and FOP
Topic: Schematron sqf:stringReplace case-insensitive
Replies: 5
Views: 2640

Re: Schematron sqf:stringReplace case-insensitive

Hi Wojtek, Stating with oXygen v18.1 we changed the "sqf:stringReplace" operation to allow using java regular expressions in the value of the @regex attribute. Therefore, the case-insensitive matching can be enabled via the embedded expression (?i). In your case you can create a quick fix that uses ...
by tavy
Thu Apr 13, 2017 2:49 pm
Forum: Common Problems
Topic: Quick fix collides with xslt schematron validation (Oxygen 19)
Replies: 2
Views: 963

Re: Quick fix collides with xslt schematron validation (Oxygen 19)

Hello, Thank you for the feedback. I will add an issue on our issue tracker to find a solution for this problem. As an workaround you can deactivate the Schematron checks for XSLT. For this you need to go to Option-Preferences->Document Type Association options page, then edit the XSLT document type...
by tavy
Mon Apr 10, 2017 5:30 pm
Forum: XML Schemas
Topic: E [ISO Schematron] no error discription
Replies: 3
Views: 2100

Re: E [ISO Schematron] no error discription

Hello,

I don't understand the exact problem. Can you send me some sample files to reproduce it? If the samples are too big you can send them to our support email address (support at oxygenxml dot com).
What oXygen version do you use?

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

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: 2360

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: 2480

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: 2480

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: 1080

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: 1545

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: 1290

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: 1720

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: 1215

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: 2101

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: 2101

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: 2078

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: 1809

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: 2994

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: 3159

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: 792

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: 792

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 ...