Page 1 of 1

How to configure Custom xml schema and xslt in oxygen web author

Posted: Wed Dec 09, 2020 4:12 pm
by pradapselvaraj
I am using trial version of oxygen web author with 60 days periods. and I have integrated the oxygen web author with alfresco using oXygen Web Author on Componize for Alfresco.

I am able to use oxygen web author from alfresco for editing the dita and ditamap files. but the problem is , I can't able to include my own custom xml schema and xslt,template in oxygen web author.

I have tried with oxygen sdk with artifact oxygen-sample-framework using eclipse , maven. and I have added my custom xsd,xstl in frameworkFiles folder and i am able to build the project.

after that i have uploaded the framework zip in oxygen --> framework --> upload in admin page and restarted the system. but still xsd,xstl is not reflected in my files.
kindly suggest the way ,to include my own xsd,xstl.

Re: How to configure Custom xml schema and xslt in oxygen web author

Posted: Wed Dec 09, 2020 4:59 pm
by mihaela
Hi,

You can find information about how you can customize Web Author with frameworks and plugins in our Oxygen Web Author Customization
Guide [1].
The guide contains a topic with details about "Integrating Web Author with Your Content by Creating Custom Frameworks" [2] and also a dedicated topic for "Using a Custom Schema in Your Framework" [3].
Please let us know if you need additional information.


[1] https://www.oxygenxml.com/doc/versions/ ... index.html
[2] https://www.oxygenxml.com/doc/versions/ ... works.html
[3] https://www.oxygenxml.com/doc/versions/ ... chema.html


Best regards,
Mihaela

Re: How to configure Custom xml schema and xslt in oxygen web author

Posted: Thu Dec 10, 2020 10:02 am
by pradapselvaraj
The three links already referred and it's not helpful much. Can you guide me with the simple example to transform the .DITA file to HTML markup using XSLT and XSD files?

Re: How to configure Custom xml schema and xslt in oxygen web author

Posted: Thu Dec 10, 2020 6:22 pm
by mihaela
Hello,

From what I understand you have XML documents with custom schema and you want to be able to edit these documents in Web Author. For this you have to create a framework that will be associated with you documents. In this framework you can specify the CSS that will be used for rendering your documents in the Web Author, the schema (XSD in your case) that will be used for validation, the actions that can be executed by the user and more. There is no need to use XSLT to transform your documents, you only have to specify the CSSs to be used for rendering.

To be able to create your framework you can use the UI from the Oxygen XML Editor or Oxygen XML Author [1]. The Document Type Configuration Dialog Box [2] allows you to easily define the association rules [3] or the schema to be used for validation [4] (and more). You can create this framework from scratch or, as you already started, you can continue with the sample framework (but we encourage you to use the UI to simplify the process).

[1] https://www.oxygenxml.com/doc/versions/ ... ation.html
[2] https://www.oxygenxml.com/doc/versions/ ... ialog.html
[3] https://www.oxygenxml.com/doc/versions/ ... s-tab.html
[4] https://www.oxygenxml.com/doc/versions/ ... a-tab.html

Best Regards,
Mihaela

Re: How to configure Custom xml schema and xslt in oxygen web author

Posted: Fri Dec 11, 2020 3:48 pm
by pradapselvaraj
Hi Mihaela,
Thanks for the response. I would like transform the attached xml file into markup using xslt file. so In the local oxygen xml author, i am opening a xml file and I can see "Text, Grid, Author" views. so now i need to get the transformed xml view(html like markup) in the Author Tab. I tried attaching the xslt for the currently opened xml file but the transformation is not happening. attached the screenshot(screenshot1.png).
screenshot1.png
screenshot1.png (215.52 KiB) Viewed 2846 times
.

I even tried inbuilt xslt copy Framework by adding the customized xslt(option-> preferences-> Document Type Association) . when i close the current xml file and open it again, it runs and validates the xml with xslt copy framework but transformation are not happening. attached the screenshot(screenshot2.png)
screenshot2.png
screenshot2.png (196.84 KiB) Viewed 2846 times
All i need is , the local oxygen editor should show the same xslt transformation as like it happening in the browser. attached the screenshot( screenshot3.png)
screenshot3.png
screenshot3.png (154.63 KiB) Viewed 2846 times
Regards,
Pradap

Re: How to configure Custom xml schema and xslt in oxygen web author

Posted: Fri Dec 11, 2020 7:11 pm
by mihaela
Hi,

The XSLT can be used in Oxygen XML Author to run some transformation, to obtain other document starting from your XML document.
If you only want to see a WYSIWYG representation of your document in Author view (in both Web Author and Oxygen XML Author) you will have to use CSS to set a specific display to your elements (for example a CSS that imposes the "table" display to your "catalog" root element).

So, the first step will be to associate a new CSS file to your document [1]. Then you will have to add all the rules and properties necessary to see your document in Author view like in your sample from the browser.
After you are happy with the resulted CSS you can start to make a framework that will be associated with your XML documents and that will automatically associate that CSS with your documents, when opening in editor.

The steps are:
1. Go to "Document Type Association" options page and press "New" button. This will create a new framework.
2. In the "Document Type" dialog that appears type a name and then select the "Association rules" tab [2] and insert a rule that can define your type of documents (for example set the name of the root element as "catalog" - in this way all the documents with this root element will be associated with this framework)
3. Select the "Author" tab, the "CSS" tab, and specify here the CSS that you already created. It is better to set the "external storage" for your framework and place the css in a folder inside your framework folder.
4. Press OK
Form now on, all your XML documents opened in Oxygen XML Author will be associated with this framework and you will see that your CSS is automatically applied when opening the document in Author mode - there is no need to directly associate the CSS in the XML document.

To check if your document is associated with your framework you can open the "Properties" view (from "Window" menu -> "Show view" submenu) and check the name of the "Document Type" listed in the properties table.

If you are happy with the resulted framework you can now upload it in Web Author (I think you already done that with a framework).
If you need further information and assistance, please let us know.

[1] https://www.oxygenxml.com/doc/versions/ ... sheet.html
[2] https://www.oxygenxml.com/doc/versions/ ... s-tab.html
[3] https://www.oxygenxml.com/doc/versions/ ... definition

Best regards,
Mihaela