Search found 273 matches

by Patrik
Sat Mar 28, 2015 6:59 pm
Forum: XML Schemas
Topic: Multi-file Schematron architecture
Replies: 7
Views: 6914

Re: Multi-file Schematron architecture

Hi, I had a similar problem with a growing schematron file I'd like to split. Since it seems like there wont be a new schematron version any time soon I modified the files included in oxygen myself. Maybe you could consider adding this to the oxygen distribution as well: customized-iso-schematron.xs...
by Patrik
Sat Mar 28, 2015 3:45 pm
Forum: XML Schemas
Topic: Further development on schematron
Replies: 13
Views: 6118

Re: Further development on schematron

I figured out why it was not working with schematronDispatcher.xsl: When doing schematron validation oxygen does not use the file schematronDispatcher.xsl directly but oXygenSchematronDispatcher.xsl. And this file imports schematronDispatcher.xsl with a relative path and, thus, within the oxygen.jar...
by Patrik
Sat Mar 28, 2015 10:29 am
Forum: XML Schemas
Topic: Finding the code from schematorn message
Replies: 3
Views: 2415

Re: Finding the code from schematorn message

After diving a little deeper into schematron I found out that it's actually quite easy to add the location information to the messages. I simply added the following code to the template "process-message": <xsl:if test="$show-code-pos = 'true'"> <axsl:text> <xsl:text> [filename: </xsl:text> <xsl:valu...
by Patrik
Fri Mar 27, 2015 5:21 pm
Forum: XML Schemas
Topic: Further development on schematron
Replies: 13
Views: 6118

Re: Further development on schematron

I did copy all the xsl files, so it needs to be something else...

For testing I modified the files in the oxygen.jar/builtin and I worked - wouldn't be my preferred solution though.

Regards,
Patrik
by Patrik
Fri Mar 27, 2015 12:23 pm
Forum: XML Schemas
Topic: Further development on schematron
Replies: 13
Views: 6118

Re: Further development on schematron

I did as you told me - all without any effect. :(

Maybe you could give me a file (xsl, zip, jar or whatever is necessary) with any(!) noticable modification in schematronDispatcher that you tested successfully?

Thanks and regards,
Patrik
by Patrik
Fri Mar 27, 2015 12:18 am
Forum: XSLT and FOP
Topic: How does XSLT utilize prefixed attributes from a separate so
Replies: 5
Views: 2522

Re: How does XSLT utilize prefixed attributes from a separat

Sorry, but I can't help you since I don't understand what you actually want and my assumptions appear to be wrong.

Regards,
Patrik
by Patrik
Thu Mar 26, 2015 7:10 pm
Forum: Feature Request
Topic: Create XInclude from Selection
Replies: 2
Views: 1905

Re: Create XInclude from Selection

It's quite easy to implement a custom author action using XsltOperation. The limits of my implementation: - The author can't enter the filename. It is rather generated from the title. - Thus it is limited to elements with a title element. - It doesn't use the selectionbut takes the first suitable an...
by Patrik
Thu Mar 26, 2015 6:26 pm
Forum: XML Schemas
Topic: Further development on schematron
Replies: 13
Views: 6118

Re: Further development on schematron

I successfully modified the iso-schematron-message.xsl. And the changes are in effect even without restarting oxygen. However, modifying the schematronDispatcher.xsl or XSD2Schtrn.xsl didn't have any effect so far - even after restarting oxygen. For instance in XSD2Schtrn.xsl I replaced line 80 (in ...
by Patrik
Thu Mar 26, 2015 5:42 pm
Forum: XSLT and FOP
Topic: How does XSLT utilize prefixed attributes from a separate so
Replies: 5
Views: 2522

Re: How does XSLT utilize prefixed attributes from a separat

Of course you could adapt the existing stylesheet as well by droping the joe-attibutes and directly formatting the values. But I understood that you WANT to use another transformation...
by Patrik
Thu Mar 26, 2015 2:29 pm
Forum: General XML Questions
Topic: Unwanted line breaks
Replies: 8
Views: 8135

Re: Unwanted line breaks

An alternative would be to add the xml:space attribute with fixed or default value 'preserve' to the schema on the note-element. For my own document type derived from dita I did this for any element that can contain text content - which are quite a lot. (But I wrote my own xml schema anyway, so it w...
by Patrik
Thu Mar 26, 2015 2:15 pm
Forum: XSLT and FOP
Topic: How does XSLT utilize prefixed attributes from a separate so
Replies: 5
Views: 2522

Re: How does XSLT utilize prefixed attributes from a separat

An xslt transformation would probably do the trick. Here's a small demonstration how to change the text content of elements with the joe:fixedLength attribute (ignoring the seperator and align attributes so far): Test-Input: <Case xmlns:joe="urn:com.website/joe" joe:separator=" "> <Tape> <P...
by Patrik
Wed Mar 25, 2015 7:17 pm
Forum: XML Schemas
Topic: Xpath result vs. xs:assert result
Replies: 8
Views: 6404

Re: Xpath result vs. xs:assert result

You need to validate the Test-xsd file against the schematron file DerivedAssert.sch
by Patrik
Wed Mar 25, 2015 12:28 pm
Forum: XML Schemas
Topic: Further development on schematron
Replies: 13
Views: 6118

Re: Further development on schematron

Thanks Adrian. It works.

Regards,
Patrik
by Patrik
Mon Mar 23, 2015 10:11 am
Forum: XML Schemas
Topic: Further development on schematron
Replies: 13
Views: 6118

Further development on schematron

I have some ideas/requirements on improvement for schematron. However, it seems there is no more any development ongoing since the latest news on http://www.schematron.com/index.html is 5 years old and the mailing lists appear to be dead as well. I there any clean way to make adjustments to the sche...
by Patrik
Sat Mar 21, 2015 9:57 pm
Forum: XML Schemas
Topic: Xpath result vs. xs:assert result
Replies: 8
Views: 6404

Re: Xpath result vs. xs:assert result

Yes, it's possible to embed schematron rules in xsd. But youÄll have the same problem as with the xs:assert: it applies to the xsml file you're validating rather the the schema itself. For demonstration (and fun) I implemented a simple "DerivedAssert" you can add into the xml schema that is being ev...
by Patrik
Fri Mar 20, 2015 9:45 pm
Forum: XML Schemas
Topic: Xpath result vs. xs:assert result
Replies: 8
Views: 6404

Re: Xpath result vs. xs:assert result

Note that you can use any xpath and call xslt function in the schematron rules. Thus, i can hardly imagine anything more flexible than that. Didn't test it but you could probably even implement a very generic schematron rule that actually evaluates an xpath expression written in the xsd. Then you co...
by Patrik
Fri Mar 20, 2015 9:11 am
Forum: XML Schemas
Topic: Xpath result vs. xs:assert result
Replies: 8
Views: 6404

Re: Xpath result vs. xs:assert result

So you want to use the xs:assert to validate your schema and not to validate the xml described by your schema, right? In this case the xs:assert would need to be placed in the xsd describing your xsd. Since you probably don't want to extend the stadard xsd for this you could do this with an addition...
by Patrik
Tue Mar 03, 2015 8:04 am
Forum: XSLT and FOP
Topic: I do not want to display a comma after last element
Replies: 5
Views: 4115

Re: I do not want to display a comma after last element

This code <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs" version="2.0"> <xsl:template match="Address"> <xsl:value-of select="string-join((AddressLine1, AddressLine2, Addr...
by Patrik
Mon Mar 02, 2015 9:45 am
Forum: XML Schemas
Topic: Finding the code from schematorn message
Replies: 3
Views: 2415

Finding the code from schematorn message

Hi, when the schematron validation fails it writes a message. When clicking on the message the cursor goes to the node that has been evaluated. Is there an easy way to jump to the schematron rule that generated this message? Since my schema is quite complex with few schematron files and several xsd ...
by Patrik
Mon Mar 02, 2015 9:37 am
Forum: XML Schemas
Topic: schema aware schematron in xsd
Replies: 2
Views: 2991

schema aware schematron in xsd

Hi, I have added soem schematron rules within my xsd. Now with growing complexity it appears that I use the same element name twice and it might happen that a schematron rules matches the second element as well which it shouldn't. Now my idea is to use schema-element or element(*, myType) as pattern...
by Patrik
Mon Mar 02, 2015 9:19 am
Forum: XSLT and FOP
Topic: I do not want to display a comma after last element
Replies: 5
Views: 4115

Re: I do not want to display a comma after last element

Hi,

this could be done with string-join:
<xsl:value-of select="string-join((AddressLine1, AddressLine2, AddressLine3, AddressLine4), ', ')"/>

It first create a list of all (existing) AddressLine*-elements and string-join will just add a ", " between all elements.

regards,

Patrik
by Patrik
Mon Mar 02, 2015 9:13 am
Forum: XSLT and FOP
Topic: Need to tokenize words that are ALL CAPS
Replies: 2
Views: 1849

Re: Need to tokenize words that are ALL CAPS

Hi Scott, how about doint this in two steps: 1. Use analyze-string to identify words. 2. in matching-substring check if it only contains caps. An alternative might be this rexexp: "(^|[\s])([A-Z\s]+)($|[\s])". With rexex-goup(2) you would get the words. However, the whitespace before/after this woul...
by Patrik
Tue Feb 10, 2015 9:40 am
Forum: XSLT and FOP
Topic: xproc vs xslt
Replies: 1
Views: 1454

xproc vs xslt

Hi, after some (more or less successfull) experiments with xproc I'm wondering if it wouln't be better to implement everything in xslt and add the missing steps (for instance fop and schematron validation) as custom exention elements written in java. My argumentation: calling xslt from xproc you can...
by Patrik
Tue Feb 10, 2015 9:26 am
Forum: Feature Request
Topic: Smart edit in xstl stylesheets based on schema components
Replies: 3
Views: 2667

Re: Smart edit in xstl stylesheets based on schema component

Hi Radu, after getting deeper into schema aware xslt I was missing the same feature. So please add my vote for it. Just to be sure: The content-completion should work as well for variables: <xsl:variable select="..." as="element(*, MyType)"/> And the "go to definition" command should work as well fo...
by Patrik
Tue Feb 10, 2015 9:21 am
Forum: XSLT and FOP
Topic: match uncaught though declared in XSL
Replies: 1
Views: 1511

Re: match uncaught though declared in XSL

Hi, the code you posted only calls <xsl:apply-templates/> to deal with the content of the para element. So without any other templates the output would be <div class="para"> 18 Further to same. </div> This is due to the default-templates that only output all the text content. Since your output is di...
by Patrik
Tue Feb 10, 2015 9:10 am
Forum: Other Issues
Topic: xi:includes and xslt
Replies: 2
Views: 1579

Re: xi:includes and xslt

Hi Emma, it is a configuration wheather the xslt engine should resolve the xi:include or not. So if the xi:include is not resolved at all (find out with <xsl:message select="."/> in your main-template) you should check this. In the oxygen settings there's an entry XML / XML-Parser / XInclude options...
by Patrik
Mon Jan 26, 2015 10:45 am
Forum: XSLT and FOP
Topic: Saxon sql: Unknown extension instruction
Replies: 2
Views: 2693

Re: Saxon sql: Unknown extension instruction

Hi Adrian,

Thanks for the hint. Even after you told be I had to use WinMerge to finde the difference...

However, i finally could get sql to work.

Regards,

Patrik
by Patrik
Mon Jan 19, 2015 4:14 pm
Forum: XSLT and FOP
Topic: Saxon sql: Unknown extension instruction
Replies: 2
Views: 2693

Saxon sql: Unknown extension instruction

Hi, i need to import data extracted from my xml documents into an oracle database. Since it is only for internal use the saxon-sql-extension sounds suitble. However, all attempts to get it to work failed so far (using oxygen 16.0)... my script: <xsl:transform version="3.0" xmlns:xsl = "http://www.w3...
by Patrik
Tue Dec 16, 2014 9:48 am
Forum: XSLT and FOP
Topic: generate pdf with calabash and apache fop
Replies: 1
Views: 1631

generate pdf with calabash and apache fop

Hi, I'm trying to convert my xslt transformation szenario for generating pdf files to an xproc transformation scenario. However, every pdf file I generated to far could not be opened by any reader cause it is invalid. Here is my xproc file: <?xml version="1.0" encoding="UTF-8"?> <p:declare-step xmln...
by Patrik
Mon Dec 15, 2014 11:21 am
Forum: General XML Questions
Topic: writing to message view from xproc
Replies: 3
Views: 2699

Re: writing to message view from xproc

Hi Adrian, thanks for the hint. With "Show XProc messages" and cx:message as well as p:error I get an output that feels acceptable. However, i will have to implement some custome xproc-steps in the next weeks anyway. Thus, I'm wondering if it is possible to implement an xproc-step in java that write...