| Author |
Message |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 26/08/2009 09:45:33
|
Victor Krapivin
Joined: 04/06/2009 10:12:44
Messages: 54
Online
|
Anonymous wrote:Hello,
I evaluate the product XslFast 4.0 and i have a few questions about it :
I have a document development cycle like this :
a/ I produce a XML Schema defining XML datasets.
b/ I need to produce a layout based on XML Schema.
c/ I need to test my layout with a sample XML dataset.
Is this development cycle possible with XSLFast ? If it's possible, how do I specify a runtime XML file to render the layout ?
Finally, I want to use XML Schema only to produce the layout. My XML Schema contains several global element. How do I specify the root element to XMLFast.
My version is XSLFast-4.0-2009-07-30.
Regards.
We're sorry but you can't currently use XSD and XML in parallel; we could realize this feature in a future version, if you are interested.
I have created a ticket for your requirement:
http://jira.jcatalog.com/browse/XSL-1534
Right now, you need to switch the data source when you want to see the preview.
You do this in the following way:
- go to the file menue
- click on "load structure from xml file"
- select your xml file
- create the preview
Or just use the XSL export in XSLfast and call your XSLT (saxon for example) and XSL-FO render (like FOP or XEP or XSLFormatter).
Note: Since XSLfast 4.0.1, you can specify sample XML file in case you've using XSD or DTD. To do this, please use Preview -> Layout settings -> Advanced tab.
This message was edited 5 times. Last update was at 23/09/2009 11:58:49
|
Best regards,
Victor Krapivin |
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 27/08/2009 10:31:38
|
Anonymous
|
Thanks for your response.
And what about selecting root element from all of the global elemnts defined in the XSD ?
Regards,
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 28/08/2009 09:30:05
|
Victor Krapivin
Joined: 04/06/2009 10:12:44
Messages: 54
Online
|
When selecting your XSD file, please select the option "[x] do not bind to top node". In this case XSLfast will not try to find the first root element and you are able to work with all root elements at the same time.
This message was edited 1 time. Last update was at 28/08/2009 15:51:33
|
Best regards,
Victor Krapivin |
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 31/08/2009 08:04:37
|
Grégoire Rolland
Joined: 31/08/2009 08:02:28
Messages: 3
Offline
|
Hello,
Thank you for your response.
I use the workaround for the execution of the layout with a XML. I wrote
a shell script to do this with saxon, fop and the generated XSL.
I find another restriction, and I don't know if it's a bug or not :
The generated XSL don't contain namespaces informations of the elements
defined in the XSD (the XPATH expression in XSL stylesheet generated
by XSLFast don't contains namespaces prefixes), so when I assign a XML to the transformation, my
xsl.fo file is empty !!
Dou you have informations about this ?
Regards,
Grégoire Rolland
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 31/08/2009 15:22:06
|
Victor Krapivin
Joined: 04/06/2009 10:12:44
Messages: 54
Online
|
When I work with XSD, the XPATH expression in XSL stylesheet generated by XSLFast don't contains namespaces prefixes.
Here we have two different problems. Using namesspaces in conjunction with XSD files and different namesspaces for different XPath expressions. In the first case, you wnat to copy the namespace definitions from your schemas to the output XSL file. For XML files, XSLfast does this automatically; for DTD and XSD files you need to give XSLfast some hints, as described below. a) Create an .XFN file in a text editor. Inside, please put some lines with the namespaces that you need to copy into XSL. Example: Add as many lines as you need, and save the file. b) Open the Preferences dialog in XSLfast (Extras -> Preferences). In this dialog goto the XSD/DTD settings tab. c) In this tab, click on "Enable custom namespaces", select the XFN file that you created before and save. Now you have custom namespaces and these namespaces will be added into your XSL files automatically. This procedure is necessary if you are using non-standard namespaces and XSD files. XSLfast tries to create namespaces itself, but for XSD it has less heuristics than for an XML file and if XSLfast cannot figure out the namespace definitions correctly, you need to make the namespaces explicit. This way Saxon will run with namespaces and your XSL-FO will not be empty as you described. This is also shown in the tutorial example named "13_Namespace". Second problem: XSLfast has no ability to add different namespaces to each XPath expression like "myn:Products", and we have no workaround for this. If you need namespaces directly in XPath expressions, you need to specify them manually. We're sorry for this limitation of XSLfast. We might add this ability into a future release. I've created a JIRA ticket for this: http://jira.jcatalog.com/browse/XSL-1535 This issue happens if you are using two or more namespaces in your XML document. If you don't need different namespaces in the XPath expressions, XSLfast will use local names for the XPath expressions.
This message was edited 4 times. Last update was at 31/08/2009 15:36:12
|
Best regards,
Victor Krapivin |
|
|
 |
|
|