XML and XSLT in XPP

I have a XML and its corresponding XSLT to generate a desired HTML. How can I apply these styles to the XML when it is imported in XPP?

Thanks in advance.

  • I assume that what you are saying is the following:
    I have an XSLT that transforms my XML into HTML and I have a CSS style sheet that formats that HTML. How do I apply that CSS stylesheet to the imported HTML in XPP?

    If that is indeed your question the answer is pretty simple. If you are using XPP V9.X you simply set your job ticket up to use the xml/css mode and you store the CSS stylesheet you have under the job folder (or library folder) under the same name as you have defined in the standard style field of the job ticket.

    And you should be done...!
    (or better said you can start enriching your CSS stylesheet by adding xpp specific properties in order to produce a 'decent' PDF document)
  • Thanks Bart for replying.

    My XSLT has basic styling information, would it be possible to import the XML and XSLT in XPP and then add specific styling/page breaks etc and generate HTML and PDF from XPP ? There are some cases where I cannot use CSS.
  • Devayani,
    If you already have an XSLT that transforms your XML in HTML, then in theory there should be no reason why you can not import the HTML in XPP and set up the styles in order to produce the PDF.
    Like that you will have and your PDF and your HTML.

    Maybe you need to give us a little more detail on what you try to do so we can give you an answer that is more meaningful to you.
  • Hi Bart,

    Our data is in DITA format and we need to generate HTML and PDF from it. The styling is not necessarily uniform and is sometimes complex, hence we cannot apply a single style-sheet for all documents. The page breaks are also required to be added in both HTML and PDF. We were hoping to import the merged DITA XML in XPP and generate both the required outputs. Is this possible?

    We were also hoping to use the web service to automate this process.
  • Hi Deveayni

    With careful planning this should all be possible but mapping out the exact requirements before starting is going to be the key to this. XPP takes XML in any format so that is not a problem, PDF production can then be achieved using that imported XML and different style sheets can be used dependant on required output. If you then export the XML after XPP composition, ie the XML that made the PDF, and add special options you can make sure the page breaks are added to the XML export - so from there a transform to HTML with the page breaks is perfectly possible. Web Services is just the automation of the project so again yes this should all be perfectly possible. A lot of this will require custom scripting but agian all perfectly possible.
  • I totally agree with what Chris said.
    Just one little remark: I would not start a new project using the XPP WebServices.
    I would go for the new XPP REST API.

    WebServices is the old way of talking to your XPP system.
    XPP REST API is the new and more lightweight way of talking to your XPP system.
    Both offer more or less the same possibilities but REST is the way forward!

  • Devayani,

    One final thought (and then I will shut up...):

    if your desired output is both PDF and HTML, then I personally would choose to transform the XML into (an enriched flavor?) HTML before you enter the XPP system.

    This will make sure you solve (and catch) all problems at import time and that you can be 100% confident that the PDF and HTML match.