XSL-FO version and fo:wrapper

Here should go questions about transforming XML with XSLT and FOP.
Briotti
Posts: 16
Joined: Mon Jan 10, 2011 6:02 pm

XSL-FO version and fo:wrapper

Post by Briotti »

I have a question about FO version and fo:wrapper element.

As per xslt 1.0 the fo:wrapper element allows only the id attribute:

http://www.w3.org/TR/2001/REC-xsl-20011 ... fo_wrapper

but as per xslt 1.1 the common properties index-class and index-key are added:

http://www.w3.org/TR/xsl/#fo_wrapper

But how to tell to Oxygen which XSD should be used? I cannot validate in the editor a FO document: it seems that a fo document belong always to the same namespace ad fo:root doesn't allow the version attribute...

<?xml version="1.0"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" ...

but probably I'm missing something :-)
adrian
Posts: 2883
Joined: Tue May 17, 2005 4:01 pm

Re: XSL-FO version and fo:wrapper

Post by adrian »

Hello,

Unfortunately there are hardly any schemas for XSL-FO.
XEP/RenderX offers an unofficial DTD and Apache FOP also has an unoffical schema available in their Subversion repository:
http://xmlgraphics.apache.org/fop/fo.html#fo-validate

I'm afraid that you won't be able to use different schemas for 1.0 and 1.1 since they are very difficult to tell apart. But if you have your own schema, you can configure Oxygen to use it. Edit(or duplicate) the FO document type in Oxygen(Options -> Preferences -> Document Type Association, select FO, press Edit) and configure it to use your schema(Schema tab).

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Briotti
Posts: 16
Joined: Mon Jan 10, 2011 6:02 pm

Re: XSL-FO version and fo:wrapper

Post by Briotti »

Thanks adrian.

I already did some changes on fo.xsd available in Oxygen to take in account some custom tags (say, fop custom extension). What I try to do is work both with xslt (and fo) 1.0 and 1.1 depending on project requirements.

Probably is it possible to add a new custom namespace to do this?
adrian
Posts: 2883
Joined: Tue May 17, 2005 4:01 pm

Re: XSL-FO version and fo:wrapper

Post by adrian »

An additional custom namespace would solve the distinction problem between them and you'd be able to use different schemas in different document types.

For an .fo file there are a few other solutions:

1. Associate the custom schema to it(Document -> Schema -> Associate Schema)

2. Create/associate a custom validation scenario(Document -> Validate -> Configure Validation Scenario, "Use custom...", press New, Add, and select a custom schema).

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Briotti
Posts: 16
Joined: Mon Jan 10, 2011 6:02 pm

Re: XSL-FO version and fo:wrapper

Post by Briotti »

tks adrian. I'll check it!
kirkilj
Posts: 110
Joined: Fri May 14, 2010 12:14 am

Re: XSL-FO version and fo:wrapper

Post by kirkilj »

It appears that the XSLFO schema in the current version of Oxygen (15) does not support XSL-FO 1.1 constructs still.

Can you confirm?

Is the only option to try to patch it?

John
adrian
Posts: 2883
Joined: Tue May 17, 2005 4:01 pm

Re: XSL-FO version and fo:wrapper

Post by adrian »

Hi,

I can confirm that the XSL-FO schema hasn't changed in Oxygen v15. There still is no proper schema available for XSL-FO 1.1.

As before, if you can find a schema for XSL-FO 1.1, you can use it with a custom validation scenario or you can edit the FO document type from Oxygen and specify the schema there (see my previous replies).

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply