Generate XSLT from XSD?

Here should go questions about transforming XML with XSLT and FOP.
mkuipers
Posts: 2
Joined: Tue Jan 29, 2008 8:19 am

Generate XSLT from XSD?

Post by mkuipers »

Hi Guys,

I'm a newbee with Oxygen and with XSD/XSL etc although have a reasonable understanding of XML.

I've been given an XSD, and have a SOAP client working successfully sending and getting XML, all validated fine with XSD.

What I want now is making an XSL for formatting and showing the returned XML in a browser.

I was hoping for a functionality where the XSL gets generated from the XSD, as it knows the structure of the returned document. Is there such a functionality within Oxygen, or using other tools?

Kind regards,
Marco
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Generate XSLT from XSD?

Post by sorin_ristache »

Hello,

There is no point and click feature in oXygen for creating on the fly the XSLT stylesheet that you need. However if you make the view XSLT/XQuery Input visible from menu Perspective -> Show View -> XSLT/XQuery Input or by switching to the XSLT development layout from menu Options -> Preferences -- Perspectives Layout you can develop your stylesheet faster by dragging the elements of the XML document from the view to the XSL editor panel where you can drop the elements to insert XSLT stylesheet elements (xsl:template, xsl:for-each, xsl:copy-of, etc) with the XPath attributes (select, test, etc) aleady filled based on the XPath of the dragged elements.


Regards,
Sorin
mkuipers
Posts: 2
Joined: Tue Jan 29, 2008 8:19 am

Re: Generate XSLT from XSD?

Post by mkuipers »

Thanks Sorin,

But I only get 'No XSLT/XQuery editor is currently selected.' in the XSLT/XQuery editor...

How do I set this up?

Cheers,
Marco
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Generate XSLT from XSD?

Post by sorin_ristache »

You have to associate a transformation scenario with the edited XSLT stylesheet. The XSLT/XQuery Input view shows the structure of the XML input file specified in the XML URL field of the scenario. That is also mentioned in the section The XSLT/XQuery Input View of the User Manual.


Regards,
Sorin
Post Reply