XML Stylesheet

Dear All
I am doing a simple proxy to file scenario in which I have to generate an XML in the end. Using the existing structure I have creatd the xsd and imported it as an external def.
Now a requirement has come that I have to put the stylesheet strength:
<?xml-stylesheet type="text/xsl" href ="../attachments/Config/SiteReport_html.xsl"?>
But when I am generating XSD after adding this tag afer <?xml version="1.0" encoding="UTF-8"?>  I cannot see it both in the xsd and in my final xml output.
How can I add this in the output xml file
Sourabh

Used a custom Java mapping to solve this problem

Similar Messages

  • Can I Include an xml-stylesheet Link in a Java Web-Service?

    The ability to easily create a SOAP-based web-service from a Java class using JDev's built in "Java Web Service" wizard is great.
    From an "Ajax enablement" perspective, I see tremendous value in having the ability to specify an XSL url in the call to that web-service, so that the server will insert an <?xml-stylesheet .../> link to the specified URL prior to the SOAP message that it returns. That way, different callers to the web-service could render the same SOAP response differently (via an XSL transformation performed on the client-side via the XSL they've specified).
    Is there already an undocumented way to do this with an Oracle "Java Web Service" that I am not aware of? If not, adding that capability would be trivial for Oracle, and it would add tremendous value to developers using Oracle's "Java Web Service" capability.

    Hi Chris,
    I take it you are using the RESTful API method to GET the data. In that case you shoul be able to perform a http POST from your js code in order to update the controls.
    This could be done as form components are updated, or after a submit button is pressed (I'm sure you are familiar with this part).
    Please see here for more information: http://zone.ni.com/reference/en-XX/help/371361J-01​/lvhowto/build_web_service/
    I hope this helps.

  • Named file entity do not load in from xml files(eg., !DOCTYPE PURANA SYSTEM "purana.dtd" [ !ENTITY CHAPTER_1 SYSTEM "./chapter_1.xml" ] ?xml-stylesheet type="text/xsl" href="purana.xsl"? PURANA TITLE /TITLE &CHAPTER_1; /PURANA )

    I create several file name entities in an external DTD.
    It used to work sometimes back but I don't remember now when it begun to fail.
    typical document for eg., is given below:
    <!DOCTYPE PURANA SYSTEM "purana.dtd" [ <!ENTITY CHAPTER_1 SYSTEM "./chapter_1.xml"> ]>
    <?xml-stylesheet type="text/xsl" href="purana.xsl"?> <PURANA>
    <TITLE>
    </TITLE>
    &CHAPTER_1;
    </PURANA>)
    the abbreviation used to work by loading the file using XSL script,
    but now it does not even work when the entity is defined within the XML document itself.

    Too difficult???
    Please helped me.
    Thank you, Theo

  • How can I add ?xml-stylesheet to an XML file?

    Hi guys,
    I have a java code that writes out an XML file. I want to specify the name of a stylesheet in the XML file. How can I do that?
    This is the source code I have:
    //---------- Create XML File ------------------
    private void createXMLFile(Document doc) throws Exception
    try
    TransformerFactory tF = TransformerFactory.newInstance();
    Transformer tr = tF.newTransformer();
    FileOutputStream outXml = new FileOutputStream(xmlFile, false);
    tr.transform(new DOMSource(doc), new StreamResult(outXml));
    outXml.close();
    catch (java.io.FileNotFoundException exc)
    throw new Exception(exc.getMessage());
    catch( TransformerConfigurationException exc )
    throw new Exception(exc.getMessage());
    catch( TransformerException exc )
    throw new Exception(exc.getMessage());
    Thank you
    Murat

    The solution from dvohra09 will output a file outXml that uses the format rules from stylesheet.
    But how can I write out the following 2 lines to outXml? contextHandler.startDocument() will only write out the first line, but not the second line...
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="mytest.xsl"?>
    Thanks for all pointers!
    Philip

  • HowTo Set the xml-stylesheet processing instruction node?

    Hi,
    Can anyone tell me via PLSQL XMLDOM object what method or attribute to set or howto specify the xml-stylesheet value at the time of generation of the xml document?
    eg
    <?xml version = '1.0'?>
    <?xml-stylesheet type="text/xsl" href="reporthtml.xsl"?>
    <Report>
    <Title>ABC Report</Title>
    </Report>
    Currently my XML just comes out as
    <?xml version = '1.0'?>
    <Report>
    <Title>ABC Report</Title>
    </Report>
    and I want to add the stylesheet reference....
    <?xml-stylesheet type="text/xsl" href="reporthtml.xsl"?>
    Any help is appreciated...

    A COTS product builds the XML and inserts the respective xsl (xml:stylesheet) file name to be used for transforming the xml. I am trying to interrupt this xml and make some updations on an element and finally send the updated xml to the stream.
    For the above process, I parse the input XML using DOMParser and update the elements (some internal elements). While I view the final XML that would be passed to the stream, I found the <?xml-stylesheet... PI is missing.
    I somehow managed using a temp fix by doing the below. I manually pulled the PI using document.getFirstChild().getNodeValue() and reconstructed the PI and inserted it to the outgoing XML. This needs to be done every time. This might run into problems when more than one PI is used in the XML.
    If the parsed XML could get the PI along with it the above problem could be resolved.
    Is there any property that could be set on the parser (prior to parsing) to resolve the issue?.

  • How to read xml-stylesheet Processing Instruction from XML using DOM Parser

    Hi,
    I am trying to read an xml that contains xsl stylesheet PI using DOMParser. The parse() method reads the entire contents of the XML except the PI instruction. Below is the XML I am using to read
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <?xml-stylesheet href="../../../lang/en-us/style0/usc_profile.xsl" type="text/xsl"?>
    <Oblix oblang="en-us" xmlns="http://www.oblix.com/" xmlns:oblix="http://www.oblix.com/">
    <ObProfile>
    </ObProfile>
    </Oblix>
    Can anyone let me know if there are any propery settings to be done for the DOM parser before parsing?. If so, what is the property to be set?.
    Thanks in Advance
    Muthu

    A COTS product builds the XML and inserts the respective xsl (xml:stylesheet) file name to be used for transforming the xml. I am trying to interrupt this xml and make some updations on an element and finally send the updated xml to the stream.
    For the above process, I parse the input XML using DOMParser and update the elements (some internal elements). While I view the final XML that would be passed to the stream, I found the <?xml-stylesheet... PI is missing.
    I somehow managed using a temp fix by doing the below. I manually pulled the PI using document.getFirstChild().getNodeValue() and reconstructed the PI and inserted it to the outgoing XML. This needs to be done every time. This might run into problems when more than one PI is used in the XML.
    If the parsed XML could get the PI along with it the above problem could be resolved.
    Is there any property that could be set on the parser (prior to parsing) to resolve the issue?.

  • Create on runtime a xml stylesheet

    hello,
    is it possible in abap to create on runtime a xml stylesheet?
    kind regards
    sebastian

    Hi Sebastian,
      Check out the code below. May be of some help to you.
    Here a successful implementation of Function module "SAP_CONVERT_TO_XML_FORMAT" for users of SAP 46c. It converts an internal table to an xml-table and downloads it.
    This code needs 3 variables: FILENAME, XML-document-Name DOC_NAME(freetext) and the internal table (TAB) which you want to convert to XML.
    TYPES: TRUXS.
    TYPES : BEGIN OF TRUXS_XML_LINE,
    DATA(256) TYPE X,
    END OF TRUXS_XML_LINE.
    TYPES: TYPE_XMLTAB TYPE TABLE OF TRUXS_XML_LINE.
    DATA: XMLTAB TYPE TYPE_XMLTAB, BIN_SIZE TYPE I.
    data: xml_tab type table of truxs_xml_line,
             Xml_tab2 type
    CALL FUNCTION 'SAP_CONVERT_TO_XML_FORMAT'
    EXPORTING
    I_FIELD_SEPERATOR = ''
    I_LINE_HEADER = ''
    I_FILENAME = FILENAME
    I_APPL_KEEP = ''
    I_XML_DOC_NAME = DOC_NAME
    IMPORTING
    PE_BIN_FILESIZE = BIN_SIZE
    TABLES
    I_TAB_SAP_DATA = TAB
    CHANGING
    I_TAB_CONVERTED_DATA = XMLTAB
    EXCEPTIONS
    CONVERSION_FAILED = 1
    OTHERS = 2.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE = BIN_SIZE
    CODEPAGE = ' '
    FILENAME = FILENAME
    FILETYPE = 'BIN'
    MODE = ' '
    WK1_N_FORMAT = ' '
    WK1_N_SIZE = ' '
    WK1_T_FORMAT = ' '
    WK1_T_SIZE = ' '
    COL_SELECT = ' '
    COL_SELECTMASK = ' '
    NO_AUTH_CHECK = ' '
    IMPORTING
    FILELENGTH =
    TABLES
    DATA_TAB = XMLTAB
    FIELDNAMES =
    EXCEPTIONS
    FILE_OPEN_ERROR = 1
    FILE_WRITE_ERROR = 2
    INVALID_FILESIZE = 3
    INVALID_TYPE = 4
    NO_BATCH = 5
    UNKNOWN_ERROR = 6
    INVALID_TABLE_WIDTH = 7
    GUI_REFUSE_FILETRANSFER = 8
    CUSTOMER_ERROR = 9
    OTHERS = 10
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    <b>SECOND PROGRAM:</b>
    REPORT abc.
    DATA
    DATA : t001 LIKE TABLE OF t001 WITH HEADER LINE.
    DATA : BEGIN OF itab OCCURS 0,
    a(100) TYPE c,
    END OF itab.
    DATA: xml_out TYPE string .
    DATA : BEGIN OF upl OCCURS 0,
    f(255) TYPE c,
    END OF upl.
    DATA: xmlupl TYPE string .
    FIRST PHASE
    Fetch Data
    SELECT * FROM t001 INTO TABLE t001.
    XML
    CALL TRANSFORMATION ('ID')
    SOURCE tab = t001[]
    RESULT XML xml_out.
    CALL FUNCTION 'SCMS_STRING_TO_FTEXT'
    EXPORTING
    TEXT = xml_out
    IMPORTING
    LENGTH =
    TABLES
    FTEXT_TAB = itab.
    Download
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    filetype = 'BIN'
    filename = 'd:\xx.xml'
    TABLES
    data_tab = itab.
    SECOND PHASE
    BREAK-POINT.
    REFRESH t001.
    CLEAR t001.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = 'D:\XX.XML'
    filetype = 'BIN'
    TABLES
    data_tab = upl.
    LOOP AT upl.
    CONCATENATE xmlupl upl-f INTO xmlupl.
    ENDLOOP.
    XML
    CALL TRANSFORMATION ('ID')
    SOURCE XML xmlupl
    RESULT tab = t001[]
    Reward points if this helps.
    Manish

  • Report using xml stylesheet

    Has anyone tried generating report output in xml and displaying using stylesheet. I need some help in this.
    Any help is appreciated.
    Thanks
    Rakesh

    Hi Rakesh,
    If you mean "Customizing Reports with XML", then you can take a look at the Chapter on this topic in Publishing Reports Manual:
    http://download.oracle.com/docs/html/B10314_01/pbr_xml.htm#1004903
    Let us know if you have Q's.
    Navneet.

  • XML, stylesheets, databases, and servers...

    Hi! I have rather complicated design problem, and I'm if XML does the
    trick. I have made an experimental web server, that acceccess my more experimental database. I would like an opinion of my quite massive idea, of how to implement that.
    Currently the server's output are done by println's. I want to get out of this, since it's hard to manage, and custom templates are hard to implement.
    I was wondering using XML with stylesheets. I have earlier made a cool system that creates smartly with minimal effort XML structure from instances. Then user (or user via a gui) could define the page templates in another XML file. With template I mean, how many records in one page, the backgroundimage, every other row different color like here in java forum, the outlook basicly.
    Then on a request server would go through the template XML file, and on that XML-file, the XML structures of objects will be joined to that according to directions in template, causing a whole page of xml to be generated.
    Another thing why I want to create XML-file is that I want also to do a gui with swing to this database, and it could be more easily done, if the output is well defined XML structure.
    Then the stylesheet, which is also part of template would be applied to that xml file, and decent output is recieved from server. Now before I start creating this whole system, I would like to now is it possible? And second question, is it possible to make it work smoothly?

    I went through some of the material the site offered. Quite cool, although I'm disapponted about that every new idea I get somebody has already done it. It used some of the implementation that I would have used, (the aspects of memory usage and the piping of the transformation process), but I learned too some new ideas from it. I cannot decide wheter I should be unique and create my own sofware or use the Cocoon... I have been known to take the hardest path for challenge usually, so maybe I should create my own server:)

  • Using JDev to easily modify XML Stylesheets (.xsl)

    Hi all -
    I'm new to JDev and XML, and am trying to modify the standard PO form from EBS/BI Publisher. Since there's a default .xsl that is close to my requirement, I thought it might be faster to modify it, rather than start over w/ creating an .rtf. I simply need to add some fields which already exist in my .xsd file.
    I have a .xml, .xsd, and .xsl files. My question...is it possible to use JDev to easily update my .xsl so that I can see my updates with new data in real time as I develop? Can anyone point me in the direction of some documentation that explains how to setup the JDev Project to connect to a DB and use these xml files together? I've tried using WYSIWIG 3rd-party tools in the hopes of accomplishing this task in a design-like view. No luck.
    I hate to recreate the wheel, but if I don't get somewhere soon, I'm going to have to go the .rtf route.
    Thanks in advance for your repsonses.
    BR -

    Are you just looking for an easy way to see the result of running XSL on your XML doc?
    If so just right click run on your XSL (or go to project properties->Run/Debug configuration->edit -> XML ) and you'll have a place to specify the files involved in the translation. You can also use debug mode.

  • IRec: view xml stylesheet for posting vacancies

    How can I view the stylesheet produced by posting a vacancy to an external site?
    Thanks in advance.
    -Kate

    How can I view the stylesheet produced by posting a vacancy to an external site?
    Thanks in advance.
    -Kate

  • How save xml-stylesheet (appearance) of Infopath xml when make a update

    Hi, please advise.
    i want to update xml, which looks like:
    <my:Allgemeine_Infos>
    <my:Projektnummer>Test</my:Projektnummer>
    <my:Datensatzstatus>in Bearbeitung</my:Datensatzstatus>
    <my:Datum>2014-10-06</my:Datum>
    <my:Ersteller>
    <pc:Person>
    <pc:DisplayName>Test user</pc:DisplayName>
    <pc:AccountId>lalala</pc:AccountId>
    <pc:AccountType></pc:AccountType>
    </pc:Person>
    </my:Ersteller>
    <my:DatensatzID>Test</my:DatensatzID>
    </my:Allgemeine_Infos>
    It is a Xml-file from Infopath library. I get a xml content using XmlDocument.InnerXml, but in this case i receive a content as one line:
    <my:Allgemeine_Infos><my:Projektnummer>Test</my:Projektnummer><my:Datensatzstatus>in Bearbeitung</my:Datensatzstatus><my:Datum>2014-10-06</my:Datum><my:Ersteller>
    <pc:Person><pc:DisplayName>Test user</pc:DisplayName><pc:AccountId>lalala</pc:AccountId><pc:AccountType></pc:AccountType></pc:Person>
    </my:Ersteller><my:DatensatzID>Test</my:DatensatzID></my:Allgemeine_Infos>
    Is there a way to receive it not as 1 line or to save it not as 1 line?
    Thanks :)
    from MSDN forum...

    Thanks for the response Shay. The xml component is added as a custom component , with a separate faces-config.xml file . This component is added to ADF project as a jar with a custom tag.
    In the ADF project , i'm having different managed beans and i can access them from a different managed bean.
    The issue is, i can't access the added custom component's backing bean which is available from a different jar , defined in a separate faces-config.xml file . This backing bean is defined with request scope.

  • Safari won't display XML content with an embedded stylesheet

    I'm using Safari 5.0.2 on Windows XP. I cannot get it to display an XML document with an embedded CSS stylesheet. The file in question appears in this ZIP file: http://www.hl7.org/documentcenter/ballots/2011JAN/downloads/CDAR2IG_SDISP_R1_D12011JAN.zip
    That document demonstrates is an attempt to enable display of standardized healthcare content in common web browsers. Can anyone here help?

    I have a separate bug report to Chrome on this one, same general result in display. The file is an XML document, not a CSS style-sheet. It contains an xml-stylesheet processing instruction that has a local URI #hl7-css-for-cda pointing to an element in the XML that contains the CSS stylesheet. That element uses xml:id to identify itself, so it is (according to the W3C) possible for the browser to determine that element as being the target of the URI.
    The problem appears to be that the Display Engine in Safari won't load the content of that URI as a CSS stylesheet.
    When I validate the CSS content in that XML element it returns as being valid CSS, and when I validate the XML using my XML editor, it is both well formed, and valid against the XML Schema appropriate to that file.

  • XML attribute not displayed by stylesheet

    HI Gentlemen,
    I set up a very simple case where some of the input data is in attributes. It works fine for the element content--firstname, however it does not display the attribute requested. What can be wrong? Please help!
    Thanks, regards
    Miklos
    The XML instance (people.xml):
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="c:\XSL\people.xsl"?>
    <people>
    <person born="1912" died="1948">
    <name>
    <firstname>Alan</firstname>
    </name>
    </person>
    </people>
    The corresponding stylesheet (people.xsl):
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="person">
    <person born="{born}" />
    </xsl:template>
    </xsl:stylesheet>

    Are you opening "people.xml" directly in a web browser?
    If so, I think you need to transform to HTML for a proper display.
    For example :
    people.xml
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="file://c:/XSL/people.xsl"?>
    <people>
    <person born="1912" died="1948">
    <name>
    <firstname>Alan</firstname>
    </name>
    </person>
    </people>
    people.xsl
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="person">
      <html>
       <body>
        <p><xsl:text>First name = </xsl:text><xsl:value-of select="name/firstname"/></p>
        <p><xsl:text>Born = </xsl:text><xsl:value-of select="@born"/></p>
        <p><xsl:text>Died = </xsl:text><xsl:value-of select="@died"/></p>
       </body>
      </html>
    </xsl:template>
    </xsl:stylesheet>Otherwise, you could use any XSLT processor to perform the transformation.

  • XML having a JSP as XSL stylesheet ...

    Hi,
    In WLS 5.1 SP6, I have a XML which uses as XSL stylesheet a JSP served by WebLogic (<?xml/stylesheet href="style.jsp?order=3"?>
    It appears that, when I try to pass more than one parameter to my JSP (i.e. "style.jsp?order=3&value=1"), the XML page does not "recognize" it anymore ... I have to pack all my parameters in a single string, pass it to my JSP and then parse it, which is quite ugly. Has somebody an explanation for this ? Thanks

    Perhaps you need to encode the '&' in the stylesheet processing instruction.
    <?xml/stylesheet href="style.jsp?order=3&value=1"?>
    "Stephane Jantzen" <[email protected]> wrote in message
    news:3a6ff593$[email protected]..
    >
    Hi,
    In WLS 5.1 SP6, I have a XML which uses as XSL stylesheet a JSP served byWebLogic (<?xml/stylesheet href="style.jsp?order=3"?>
    >
    It appears that, when I try to pass more than one parameter to my JSP(i.e. "style.jsp?order=3&value=1"), the XML page does not "recognize" it
    anymore ... I have to pack all my parameters in a single string, pass it to
    my JSP and then parse it, which is quite ugly. Has somebody an explanation
    for this ? Thanks
    >

Maybe you are looking for

  • Build a EJB/ Application with Sun One Studio and deploy to Weblogic

    Dear all, My boss require me to use Sun One Studio 4 update 1 to do the development, but I find it's a nightmare to deploy the EJB/ application to the WebLogic 6.1. I've already installed the weblogic plug-in in the Sun One Studio. During deploying I

  • Cannot see all photos in my photo stream on iPhone 6

    IBjust upgraded to iOS 8.1 in hopes of being able to see the photos in my photo stream on iPhone 6.  I can only see a few of the photos from my photo stream mainly recent photos

  • Jsp Design view not working

    For some reason I can't create or edit jsp files within the design view. I get a blank screen with the following text in the middle "Type, paste, or drag content onto this blank page, or drag and drop a component from the palette. The weird thing is

  • My itunes quit working!!

    The most recent update for itunes would not download properly.  So I tried doing it manually and that did not work either.  When I tried loading itunes the program no longer would load due to errors.  I have tried uninstalling and reinstalling the pr

  • WBS in MB51 Report

    Dear Experts, In report MB51, WBS Field is there. It is shown for Movement type 101,102, 122,415 Q etc But is not shown for  Movement types 221 & 281 Q. What is reason? Is any patch updation, correction required? Thanks in advance. SSanjay