Xalan gui xml

I am trying to program a java swing gui with one button that will
transform old.xml to new.xml using transform.xsl using xalan
but the compiler gives an error message:
Transform2.java:53: unreported exception javax.xml.transform.TransformerException; must be caught or declared to be thrown
transformation("hamlet.xml","transformation1.xsl","hamletnew.xml"
anyone know the solution of this problem
this is the complete code:
//using apache xalan to transform old.xml with tranform.xsl into new.xml
//with java swing gui
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
public class Transform2
public static void main(String[] args)throws TransformerException, TransformerConfigurationException,FileNotFoundException, IOException
JFrame frame = new JFrame("Event Handling Tombol & TextField");
final JButton button = new JButton("Transform");
ActionListener eventclick =
new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (e.getSource() == button) {
transformation("old.xml","transform.xsl","new.xml");
button.addActionListener(eventclick);
frame.getContentPane().setLayout(new FlowLayout());
frame.getContentPane().add(button);
frame.pack();
frame.setVisible(true);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
private static void transformation(String inputfile,String xslfile,String outputfile)throws TransformerException, TransformerConfigurationException,FileNotFoundException, IOException
// Use the static TransformerFactory.newInstance() method to instantiate
// a TransformerFactory. The javax.xml.transform.TransformerFactory
// system property setting determines the actual class to instantiate --
// org.apache.xalan.transformer.TransformerImpl.
TransformerFactory tFactory = TransformerFactory.newInstance();
// Use the TransformerFactory to instantiate a Transformer that will work with
// the stylesheet you specify. This method call also processes the stylesheet
// into a compiled Templates object.
Transformer transformer = tFactory.newTransformer(new StreamSource(xslfile));
// Use the Transformer to apply the associated Templates object to an XML document
// (foo.xml) and write the output to a file (foo.out).
transformer.transform(new StreamSource(inputfile), new StreamResult(new FileOutputStream(outputfile)));

Crossposted in 4 places.

Similar Messages

  • Xalan gui

    I am trying to program a java swing gui with one button that will
    transform old.xml to new.xml using transform.xsl using xalan
    but the compiler gives an error message:
    Transform2.java:53: unreported exception javax.xml.transform.TransformerException; must be caught or declared to be thrown
    transformation("hamlet.xml","transformation1.xsl","hamletnew.xml"
    anyone know the solution of this problem
    this is the complete code:
    //using apache xalan to transform old.xml with tranform.xsl into new.xml
    //with java swing gui
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerConfigurationException;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.stream.StreamResult;
    import javax.xml.transform.stream.StreamSource;
    public class Transform2
    public static void main(String[] args)throws TransformerException, TransformerConfigurationException,FileNotFoundException, IOException
    JFrame frame = new JFrame("Event Handling Tombol & TextField");
    final JButton button = new JButton("Transform");
    ActionListener eventclick =
    new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    if (e.getSource() == button) {
    transformation("old.xml","transform.xsl","new.xml");
    button.addActionListener(eventclick);
    frame.getContentPane().setLayout(new FlowLayout());
    frame.getContentPane().add(button);
    frame.pack();
    frame.setVisible(true);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    private static void transformation(String inputfile,String xslfile,String outputfile)throws TransformerException, TransformerConfigurationException,FileNotFoundException, IOException
    // Use the static TransformerFactory.newInstance() method to instantiate
    // a TransformerFactory. The javax.xml.transform.TransformerFactory
    // system property setting determines the actual class to instantiate --
    // org.apache.xalan.transformer.TransformerImpl.
    TransformerFactory tFactory = TransformerFactory.newInstance();
    // Use the TransformerFactory to instantiate a Transformer that will work with
    // the stylesheet you specify. This method call also processes the stylesheet
    // into a compiled Templates object.
    Transformer transformer = tFactory.newTransformer(new StreamSource(xslfile));
    // Use the Transformer to apply the associated Templates object to an XML document
    // (foo.xml) and write the output to a file (foo.out).
    transformer.transform(new StreamSource(inputfile), new StreamResult(new FileOutputStream(outputfile)));

    Your transformation method is declared to throw a number of exceptions. You need to handle these in your actionPerformed method (probably displaying an error message to the user to indicate what went wrong).

  • Recently posted RFE:  GUI XML configuration

    libGlade style loading of GUI information from an xml
    resource file.
    Read over:
    http://freshmeat.net/projects/libglade/?topic_id=58
    Java code might look like this:
    AutoSwing auto = new AutoSwing("foo.xml");
    JFrame jf = ((JFrame)auto.get("myFrame"));
    jf.show();
    JButton jb =  ((JButton)auto.get("myFavoriteButton"));
    jb.setText("Hello AutoSwing World!");
    //etcMight be fun to discuss the possibilities of having a layout tool
    ... I know many developers would rather be doing Rapid Development than
    detailed GUI work, at least for simple programs.
    This would create an easy to use STANDARD, especially if
    supported by the "Standard" Edition. Ideally a layout tool
    would also ship with the Standard Edition.
    So, what do you think?

    u may also want to checkout
    http://sourceforge.net/projects/xmlswing/

  • Swapping XML Parser and XSLT to Xalan 2.7.0 - Not Working (OC4J 10.1.3)

    Hi-
    I'm trying to use the latest Xercies/Xalan classes in OC4J 10.1.3 as described in the How-To swap XML Parsers document:
    http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-swapxmlparser/doc/readme.html
    What I can see happening is that the oracle.xml shared library is successfully 'turned off', but the xalan libraries are not added. Instead, the default xml classes that are distributed with the JDK become visible. For instance, using a slightly modified version of the index.jsp page from the how-to, I get this result:
    ------ Output from JSP page ----------------
    TransformerFactory Instance: org.apache.xalan.processor.TransformerFactoryImpl
    Transformer Instance: org.apache.xalan.transformer.TransformerIdentityImpl
    Transformer Version: Xalan Java 2.4.1 (!!)
    What I expect is for that last line to say version 2.7.0, which is the version of the xalan.jar included in my shared library (code to add that line to the how-to shown below).
    I suspect what is happening is that the class loader is simply not letting a shared library override a system library - to do that you probably need to place the jar files in system endorsed directory.
    Has anyone gotten this how-to to work - actually replacing the XML parser/transform classes with the latest Xalan classes? Are you sure it is seeing the current version you placed in the shared library?
    Thanks,
    Eric Everman
    ---- My modified getXSLTDetails() method in the index.jsp page of the how-to -------
    <!-- Additional Import -->
    <%@ page import="org.apache.xalan.Version" %>
    public static String getXSLTDetails()
    Transformer transformer=null;
    TransformerFactory transformerfactory = TransformerFactory.newInstance();
         Version ver = null;
         String br = "<" + "br" + ">"; //otherwise the otn forum chocks on the break.
    try
    transformer = transformerfactory.newTransformer();
              ver = (Version) transformer.getClass().forName("org.apache.xalan.Version").newInstance();
              String ret_val =
                   "TransformerFactory Instance: "+transformerfactory.getClass().getName() + br +
                   "Transformer Instance: "+transformer.getClass().getName() + br;
              if (ver != null) {
                   ret_val = ret_val + "Transformer Version: " + ver.getVersion() + br;
              } else {
                   ret_val = ret_val + "Transformer Version not Available" + br;
              return ret_val;
    catch (Exception e)
    e.printStackTrace();
    return e.getMessage();
    }--------------------------------------------------------------------

    Steve - Thanks for responding on this.
    The Xalan SQL extension is built into Xalan. The most painless way to try it out is to run it via JEdit: www.jedit.org
    JEdit a OS Java application with a fairly painless install process (I'm assuming you already have a current JRE installed). Once its installed, you'll need to install the XSLT plugin - in JEdit goto Plugins | Plugin Manager | Install and pick the XSLT plugin. You'll need the Oracle JDBC classes on your classpath - this can be done by copying the oracle_jdbc4.jar into the [JEdit install directory]/jars directory.
    Restart to load that jar and you should be all set.
    I included a sample XSLT page at the bottom of this post that is somewhat of a template transform for the SQL extension - its more complicated then it needs to be, but it does some nice things with the results of the query. Save it as a file and make the appropriate changes to the 'datasource' parameter near the top of the file.
    Then in JEdit, open the file and make sure the XSLT plugin is visible (Plugins | XSLT | XSLT Processor Toggle - or alternately dock it in the window via global prefs). In the XSLT plugin: Allow the current buffer to be used as the source, Add that same file as a stylesheet via the '+' button, and pick a result file at the bottom. Then click the 'Transform XML' button.
    Troubleshooting: I seem to remember having some classpath errors when I tried this on windows, but others have had it work w/o issues. I do remeber that the XSLT plugin had a popup window that gave a pretty good explaintion of the problem, if it occurs. Also, for some reason the XSLT plugin will not create a new file for the output, so its often best to create a file first, then choose it as the output. Of course, you can always run a transformation from the command line or w/in an applicatoin. Full docs on the Xalan SQL extension can be found at: http://xml.apache.org/xalan-j/extensionslib.html#sql
    Here is my sample XSLT transform using the SQL extension:
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
              xmlns:sql="http://xml.apache.org/xalan/sql"
              xmlns:str="http://exslt.org/strings"
              xmlns:xalan="http://xml.apache.org/xalan"
              extension-element-prefixes="sql str xalan">
         <xsl:output indent="yes"/>
         <xsl:param name="driver">oracle.jdbc.OracleDriver</xsl:param>
         <xsl:param name="datasource">jdbc:oracle:thin:jqpublic/jqpublic@server_name:1521:dbname</xsl:param>
         <xsl:param name="jndiDatasource"><!-- jndi source for production use w/in enterprise environment --></xsl:param>
         <xsl:param name="debug">true</xsl:param>
         <xsl:variable name="connection" select="sql:new()"/>
         <xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
         <xsl:variable name="lowercase" select="'abcdefghijklmnopqrstuvwxyz'"/>
         <!--
              The query:  You could pass parameters in to this query to build a where clause, but here is a simple example.
              Also, its nice to wrap the query with a max row number to prevent huge results.
         -->
         <xsl:param name="query">
         select * from (
      SELECT
              'One' FIELD_1,
              'Two' FIELD_2
         FROM DUAL
         ) where rownum < 100
         </xsl:param>
         <!-- Essentially, create a XConnection object -->
         <xsl:variable name="connection" select="sql:new()"/>
         <xsl:template match="/">
        <xsl:choose><!-- Connect using JNDI -->
          <xsl:when test="$jndiDatasource != ''">
            <xsl:if test="not(sql:connect($connection, $jndiDatasource))">
              <xsl:message>Failed to connect to db via jndi connection</xsl:message>
              <xsl:comment>Failed to connect to db via jndi connection</xsl:comment>
              <xsl:if test="$debug = 'true'">
                <xsl:copy-of select="sql:getError($connection)/ext-error"/>
              </xsl:if>
            </xsl:if>
          </xsl:when>
          <xsl:otherwise><!-- Connect using connection string -->
            <xsl:if test="not(sql:connect($connection, $driver, $datasource))">
              <xsl:message>Failed to connect to db via driver/url connection</xsl:message>
              <xsl:comment>Failed to connect to db via driver/url connection</xsl:comment>
              <xsl:if test="$debug = 'true'">
                <xsl:copy-of select="sql:getError($connection)/ext-error"/>
              </xsl:if>
            </xsl:if>
          </xsl:otherwise>
        </xsl:choose>
              <!--
              The results of the query.  The rowset is brought back in 'streaming' mode,
              so its not possible to ask it for the number of rows, or to check for zero
              rows.  There is a switch to disable streaming mode, but this requires all
              rows to be brought into memory.
              -->
              <xsl:variable name="table" select="sql:query($connection, $query)"/>
              <xsl:if test="not($table)">
                   <xsl:message>Error in Query</xsl:message>
                   <xsl:copy-of select="sql:getError($connection)/ext-error"/>
              </xsl:if>
              <page>
                   <!-- Your xalan environment -->
                   <xsl:copy-of select="xalan:checkEnvironment()"/>
                   <!-- Build a bunch of metadata about the rows -->
                   <meta>
                        <cols>
                             <xsl:apply-templates select="$table/sql/metadata/column-header"/>
                        </cols>
                   </meta>
                   <rowset>
                        <!--
                             With streaming results, you must use the apply-temmplates contruct,
                             not for-each, since for-each seems to attempt to count the rows, which
                             returns zero.
                        -->
                        <xsl:apply-templates select="$table/sql/row-set"/>
                   </rowset>
              </page>
              <xsl:value-of select="sql:close($connection)"/><!-- Always close -->
         </xsl:template>
         <xsl:template match="row">
              <row>
                   <xsl:apply-templates select="col"/>
              </row>
         </xsl:template>
         <xsl:template match="column-header">
              <col>
                   <xsl:attribute name="type">
                        <xsl:value-of select="@column-typename"/>
                   </xsl:attribute>
                   <xsl:attribute name="display-name">
                        <xsl:call-template name="create-display-name"/>
                   </xsl:attribute>
                   <xsl:value-of select="@column-name"/>
              </col>
         </xsl:template>
         <!-- Convert column names to proper caps: MY_FIELD becomes My Field -->
         <xsl:template name="create-display-name">
              <xsl:variable name="col-name">
                   <xsl:for-each select="str:tokenize(@column-name, '_')">
                        <xsl:value-of
                             select="concat(translate(substring(., 1, 1), $lowercase, $uppercase), translate(substring(.,2), $uppercase, $lowercase), ' ')"/>
                   </xsl:for-each>
              </xsl:variable>
              <xsl:value-of select="substring($col-name, 1, string-length($col-name) - 1)"/>
         </xsl:template>
         <!-- Creates data columns named 'col' with a column-name attribute -->
         <xsl:template match="col">
              <col>
                   <xsl:attribute name="column-name"><xsl:value-of select="@column-name"/></xsl:attribute>
                   <xsl:value-of select="."/>
              </col>
         </xsl:template>
    </xsl:stylesheet>

  • GUI from an XML file

    Hello everybody,
    My problem is this: I have to do a GUI from an XML file. I am a begginer in JAVA, in GUI development and in XML. So... my situation is a bit difficult. What I have in mind is, if possible, to have a kind of function (that maybe already exists) that opens the XML file, read the whole document, keep the information in some variables and, from them, I can build the GUI using Swing. Is it possible this? Any help please, any idea?
    Thanks a lot!!
    Fran.

    Of course, this is possible. But what kind of "GUI XML" are you talking about? Is the XML given? Does it already conform to some GUI-XML-API? Give more infos!

  • XML GUI

    (I'm not sure if this is the right spot, but it was the best I could find.)
    I am interested in using a XML GUI parser to seperate the GUI from the rest of the code.
    I dont want the user to have to install anything besides the JRE to run my program. Which one is best to do this with?
    I would prefer to load up the program as a module in my program, and just call to it, and it would create the GUI.
    Any suggestions for easy to use GUI-XML programs?

    Ok, I figure it was better to learn Java without the IDE, because then I'm not learning the IDE, I'm learning the language.
    So do you have a working project, at all, with SwiXML? I'm not looking to abduct you project or anything, I just learn better from example.
    I would greatly appreciate this, if you could do that for me. You could remove all your code, except for the part that creates the interface if you are worried.
    In return I could give a service to you. You need a code monkey?

  • Problem in IAS Server with generation of PDF with FOP and XML parsing

    Dear co.forumers :
    We are developing an application that generates a pdf document with FOP Apache utilities, and this PDf is stored in a folder of the server. Firts of all, a DDBB data is retrieved using java ( jdbc) middleware classes ( servlets ), and with these data, the pdf is generated using FOP. In these process, he data retrieved from the DDBB is converted in a XML file , and the with the XSL FOP utility, the pdf is generated.
    In the other hand, we have another application that consults data from a java beans, using a JSP, generates a XML with the data of the beans, and with this XML, and with a XSL file generates and html , with the data and fixed text.
    Both applications have been deployed as a separated WebApp in the IAS. Both use Xalan as XML parser amb Xerces is used aswell.
    So, the problem is , after generating a pdf with the firts application, every html generated via JSP-XML-XSL transformation in the second application is shown completelly bad formated. All fixed text are wrongly composed, and the text that should appear in textFields and ComboBoxes is also bad formated. The XML with the data is well generated, so the problem is in the parsing of these XML and the conversion in html through XSL. We have to re-initiate the server and then everything goes well again. If no pdf is launched, no problem occurs with the other application.
    How an a WEB APP pplication can affect to another, installed both in different folders of the IAS ? We tried to change Xalan version and FOP version, but no result.
    Is this a Poltergeist ?? and X file , maybe ?
    Has anyone had the same problem ?
    Pleae, any help will be very wellcomed.

    A PDF document may be generated in the JDeveloper OC4J server.
    http://www.oracle.com/technology/pub/notes/technote_vohra_fop.html

  • XML transformation using XSLT in JSP page

    Hi,
    Please help, I'm getting this error when I try to render my xml file using an xsl style sheet in my JSP page. Am I missing a JAR? Thanks
    Error 500: org/apache/xalan/xslt/XSLTInputSource
    Here's xsl file
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method='html' version='1.0' encoding='UTF-8' indent='yes'/>
    <xsl:template match="/">
      <html>
      <body>
      <h2>My CD Collection</h2>
        <table border="1">
          <tr>
            <th align="left">Title</th>
            <th align="left">Artist</th>
          </tr>
          <xsl:for-each select="catalog/cd">
          <tr>
            <td><xsl:value-of select="title"/></td>
            <td><xsl:value-of select="artist"/></td>
          </tr>
          </xsl:for-each>
        </table>
      </body>
      </html>
    </xsl:template>
    </xsl:stylesheet>
    And here's my JSP page
    <%@taglib uri="http://jakarta.apache.org/taglibs/xsl-1.0" prefix="xsl"%>
    <html>
    <head><title>Phone Book</title></head>
    <body>
    <xsl:apply xml="/xml/book.xml" xsl="/xml/book.xsl" />
    </body>
    </html>
    And here's my xml file
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!-- Edited with XML Spy v4.2 -->
    <catalog>
         <cd>
              <title>Empire Burlesque</title>
              <artist>Bob Dylan</artist>
              <country>USA</country>
              <company>Columbia</company>
              <price>10.90</price>
              <year>1985</year>
         </cd>
         <cd>
              <title>Hide your heart</title>
              <artist>Bonnie Tyler</artist>
              <country>UK</country>
              <company>CBS Records</company>
              <price>9.90</price>
              <year>1988</year>
         </cd>
    </catalog>

    i would think the browser should be able do the transformation itself, rather than having to do this transformation on the server.
    If you want to do this on the server, you can always try adding xalan.jar, xml-apis.jar and xercesImpl.jar to your server's lib directory, downloaded from
    apache.org

  • Transform XML and display xsl:message

    Hi,
    I have a simple method to transform XML. My XSLT has <xsl:message> to help debugging while transforming. How do I access the messages to System.out.printLn?
    public static Document transformXML(Document xmlDoc, Document xslDoc) throws XMLHelperException {
              try {
                   TransformerFactory factory = TransformerFactory.newInstance();
                   Transformer transformer = factory.newTransformer(new DOMSource(xslDoc));
                   DOMResult result = new DOMResult();
                   transformer.transform(new DOMSource(xmlDoc), result);
                   org.w3c.dom.Node resultNode = result.getNode();
                   if (resultNode instanceof Document) return (Document)resultNode;
                   else return result.getNode().getOwnerDocument();
              } catch (TransformerConfigurationException ex) {
                   throw new XMLHelperException("Unable to perform transform " + ex.getLocationAsString(), ex);
              } catch (TransformerException ex) {
                   throw new XMLHelperException("Unable to perform transform " + ex.getLocationAsString(), ex);
         }thanks for the help.
    Edited by: bonekrusher on Mar 8, 2008 2:27 PM
    Edited by: bonekrusher on Mar 8, 2008 2:27 PM

    public class XForm {
         public static void main(String[] args) throws Exception {
              InputStream xslStream = null;
              InputStream xmlStream = null;
              try {
                   TransformerFactory tf = TransformerFactory.newInstance();
                   xslStream = new BufferedInputStream(new FileInputStream(args[1]));
                   Transformer t = tf.newTransformer(new StreamSource(xslStream));
                   tf.setErrorListener(new ErrorListener() {
                        public void error(TransformerException ex) throws TransformerException {
                             ex.printStackTrace();
                        public void fatalError(TransformerException ex) throws TransformerException {
                             ex.printStackTrace();
                        public void warning(TransformerException ex) throws TransformerException {
                             ex.printStackTrace();
                   xmlStream = new BufferedInputStream(new FileInputStream(args[0]));
                   t.transform(new StreamSource(xmlStream), new StreamResult(System.out));
              } catch (Exception e) {
                   e.printStackTrace();
              } finally {
                   if (xslStream != null)
                        xslStream.close();
                   if (xmlStream != null)
                        xmlStream.close();
    <test>
         <sample try="yes">
              a
         </sample>
    </test>
    <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xalan="http://xml.apache.org/xalan">
         <xsl:template match="/">
              <xsl:message terminate="no">got here</xsl:message>
              <xsl:apply-templates/>
         </xsl:template>
         <xsl:template match="*|@*">
              <xsl:copy>
                   <xsl:apply-templates/>
              </xsl:copy>
         </xsl:template>
    </xsl:transform>          

  • How to use 3rd party jar files for xml transform

    Hi all,
    Am using OAS9.0.4 and I deployed my .ear successfully.
    In my application am using 4 jar files for xml transformation. (xerces.jar, xalan.jar, xml-apis.jar,xercesImpl.jar)
    OAS has its own xmlparserv2.jar file. Its using this jar file for transforming xml data and not even looking for above mentioned 4 jar files.
    In opmn.xml, I provided these 4 jar files in to class path. Then also it didn't effect my output.
    I also tried as put these 4 jar files into j2ee\home\applib directory, but o result.
    Can anybody tell me where should I keep these 4 jar files in OAS and OAS should use these 4 jar files instead of its own xmlparserv2.jar for transforming data.
    Thanks in Anticipation,
    Regards,
    RK

    Add the Xbootclasspath variable in the java-options field. It will somewhat look like the following in your opmn.xml file
    <process-type id="<OC4J Instance Name>" module-id="OC4J">
    <module-data>
    <category id="start-parameters">
    <data id="java-options value="........... -Xbootclasspath^/a:<location of your jar files>" />
    Ensure to use th ^/a (append) signature
    Regards,
    Chirag

  • Using multiple XSL files parsing a XML file

    Hi,
    Can a single XML be procesed by a XSL file in which are included many XSL stylesheet?
    I mean, my Java servlet writes the results of the SQL
    queries in a single XML document. Something like this:
    <?xml version="1.0" encoding="UTF-8" ?>
    <body>
    <!-- Part 1 -->
    <record>
    <nombre>Monica</nombre>
    <apellido1>Amann</apellido1>
    <apellido2>Ostos</apellido2>
    </record>
    <!-- Part 2 -->
    <record>
    <domicilio>Rodriguez Arias</domicilio>
    <numero>41</numero>
    <piso>5</piso>
    </record>
    <!-- Part 3 -->
    <record>
    <nombre>Ana</nombre>
    <apellido1>Garcia</apellido1>
    <apellido2>Ostos</apellido2>
    <domicilio>Rodriguez Arias</domicilio>
    <numero>41</numero>
    <piso>5</piso>
    <mano>Decha</mano>
    </record>
    </body>
    I want to be able to apply a particular stylesheet into diferent part of the XML file.
    I mean, i have a XSL (father), in which are included various XSL. My problem is that
    i can apply the bloque1.xsl to process part1 in the xml, and bloque2.xsl to process
    part2 in the xml and the same with the thrid.
    This is my XSL (father), but i don't know whats the way to do it. And i don�t konw if
    it's possible to do it.
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:fo="http://www.w3.org/1999/XSL/Format"
    version="1.0">
    <xsl:include href="/aplic/fop/ejemplos/bloque1.xsl" />
    <xsl:include href="/aplic/fop/ejemplos/bloque2.xsl" />
    <xsl:include href="/aplic/fop/ejemplos/bloque3.xsl" />
    <xsl:template match="body">
         <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
              <fo:layout-master-set>
              <fo:simple-page-master master-name="simple"
                   page-height="21cm"
                   page-width="21cm"
                   margin-top="1cm"
                   margin-bottom="1cm"
                   margin-left="1.5cm"
                   margin-right="1.5cm">
                   <fo:region-body margin-top="1.5cm"
                   margin-bottom="1.5cm"/>
              </fo:simple-page-master>
              </fo:layout-master-set>
              <fo:page-sequence master-reference="simple">
              <fo:flow flow-name="xsl-region-body">
              <fo:block text-align="right">
                        <fo:external-graphic src="c:\aplic\fop\ejemplos\barcode.jpeg" width="8.1cm" height="3.7cm"/>
              </fo:block>
                   <xsl:apply-templates/>
              </fo:flow>
              </fo:page-sequence>
         </fo:root>
    </xsl:template>
    <!-- Here i should code the rest of the XSL to join the diferents parts of the XML with its corresponded XSL -->
    </xsl:stylesheet>
    Finally i have to produce a single resultant report into pdf outformat. For this, i am using XSL-FO.
    Thanks a lot, and i'm sorry for my english language.

    The examples of Xalan (check xml.apache.org) do just that.
    Micks

  • Bursting from an XML file

    I have a BIP Report that I'm generating from an XML file. The XML file also contains the email addresses to which these reports should be bursted to. When creating the data model from the XML file, I have the option of defining my bursting options but it seems that "SQL Query" is only allowed option.
    Is it not possible to burst dynamically from an XML file?
    Could you show me how I can get this done. The docs haven't really been too helpful.
    Thanks

    Of course, this is possible. But what kind of "GUI XML" are you talking about? Is the XML given? Does it already conform to some GUI-XML-API? Give more infos!

  • CME not creating custom SEP MacAddress .cnf.xml files, using XMLDefault.cnf.xml for phones

    Hello, I have CME 8.6 installed on two 2851s and before going into production, I am testing a few phones.
    One of my 2851's is creating cnf.xml files for each phone using SEP<Mac address>.cnf.xml and the other one will not and the phones keep booting up with XMLDefault.cnf.xml.
    I've looked at both configurations and I can't see what the difference is. Other than not being able to create the SEP<MacAddress>.cnf.xml files, the phones appear to be loading up fine. 
    One difference I see is the "its" directory is located on system: on the one that creates the cnf files, and the "its" directory is located in flash on the one that doesn't, although I don't know how that matters.
    Below is the one that doesn't create the SEP<MACADDRESS>.cnf.xml files for phones:
    Current configuration : 2657 bytes
    ! Last configuration change at 02:12:45 UTC Wed Oct 8 2014
    version 15.1
    service timestamps debug datetime msec
    service timestamps log datetime msec
    no service password-encryption
    hostname RtrPod2
    boot-start-marker
    boot-end-marker
    no aaa new-model
    no network-clock-participate wic 3
    crypto pki token default removal timeout 0
    dot11 syslog
    ip source-route
    ip cef
    ip dhcp excluded-address 20.0.30.0 20.0.30.10
    ip dhcp excluded-address 20.0.10.0 20.0.10.10
    ip dhcp pool Data
     network 20.0.10.0 255.255.255.0
     default-router 20.0.10.254
     option 150 ip 20.0.30.254
    ip dhcp pool Voice
     network 20.0.30.0 255.255.255.0
     default-router 20.0.30.254
     option 150 ip 20.0.30.254
     dns-server 8.8.8.8
    no ipv6 cef
    multilink bundle-name authenticated
    voice-card 0
    license udi pid CISCO2851 sn FTX1331AJQ1
    username cisco privilege 15 password 0 cisco
    redundancy
    controller T1 0/3/0
    controller T1 0/3/1
    interface Loopback0
     no ip address
    interface GigabitEthernet0/0
     no ip address
     duplex auto
     speed auto
    interface GigabitEthernet0/0.10
     encapsulation dot1Q 10
     ip address 20.0.10.254 255.255.255.0
    interface GigabitEthernet0/0.30
     encapsulation dot1Q 30
     ip address 20.0.30.254 255.255.255.0
    interface GigabitEthernet0/1
     ip address 192.168.5.232 255.255.255.0
     duplex auto
     speed auto
    interface Serial0/0/0
     no ip address
     shutdown
     clock rate 2000000
    interface Serial0/0/1
     ip address 200.2.0.1 255.255.255.0
    ip forward-protocol nd
    no ip http server
    no ip http secure-server
    tftp-server flash:cmterm-7940-7960-sccp.8-1-2.cop.sgn alias cmterm-7940-7960-sccp.8-1-2
    tftp-server flash:/Ringtones/DistinctiveRingList.xml alias DistinctiveRingList.xml
    tftp-server flash:/Ringtones/Ringlist.xml alias Ringlist.xml
    tftp-server flash:P00308010200.bin
    tftp-server flash:P00308010200.loads
    tftp-server flash:P00308010200.sb2
    tftp-server flash:P00308010200.sbn
    control-plane
    mgcp profile default
    telephony-service
     no auto-reg-ephone
     max-ephones 110
     max-dn 288
     ip source-address 20.0.30.254 port 2000
     system message Branch System
     load 7960-7940 P00308010200
     max-conferences 8 gain -6
     transfer-system full-consult
     create cnf-files version-stamp Jan 01 2002 00:00:00
    ephone-dn  1  dual-line
     number 2000
     label Phil Davis
     description Branch Office
    ephone  1
     device-security-mode none
     mac-address 0009.E89D.0B4F
     username "cisco" password cisco
     button  1:1
    line con 0
    line aux 0
    line vty 0 4
     login local
     transport input all
    line vty 5 15
     login local
     transport input all
    scheduler allocate 20000 1000
    end

    Hello, and thanks for the good advice. I did try and added the cnf perphone command and ran no create cnf-files and then create cnf-files, but unfortunately its still not making them.
    Also, from the other few CME installations I've seen, all of the information is in flash, but for some reason when I xtracted the tar for this CME, it's showing up in system: ? Could that be a problem?  Here is what I see:
    CompactFlash directory:
    File  Length   Name/status
      1   67922508  c2800nm-adventerprisek9-mz.151-4.M8.bin
      2   85149696  cme-full-8.0.0.1.tar
      3   2942935  apps11.8-5-3TH1-6.sbn
      4   503269   cnu11.8-5-3TH1-6.sbn
      5   2104751  cvm11sccp.8-5-3TH1-6.sbn
      6   340615   dsp11.8-5-3TH1-6.sbn
      7   1616686  jar11sccp.8-5-3TH1-6.sbn
      8   670      SCCP11.8-5-3S.loads
      9   674      term06.default.loads
     10   674      term11.default.loads
     11   1916     MISCH-1.3.3.SBN
     12   900      CP7921G-1.3.3.LOADS
     13   900      CP7925G-1.3.3.LOADS
     14   674      term42.default.loads
     15   674      term62.default.loads
     16   670      SCCP42.8-5-3S.loads
     17   655      term31.default.loads
     18   654      term41.default.loads
     19   654      term45.default.loads
     20   654      term61.default.loads
     21   654      term65.default.loads
     22   654      term70.default.loads
     23   654      term71.default.loads
     24   654      term75.default.loads
     25   651      SCCP31.8-5-3S.loads
     26   650      SCCP41.8-5-3S.loads
     27   650      SCCP45.8-5-3S.loads
     28   650      SCCP70.8-5-3S.loads
     29   650      SCCP75.8-5-3S.loads
     30   61       SCCP69xx.8-5-3-0.loads
     31   131470   Desktops/320x212x12/CampusNight.png
     32   80565    Desktops/320x212x12/CiscoFountain.png
     33   8156     Desktops/320x212x12/CiscoLogo.png
     34   138278   Desktops/320x212x12/FOUNTAIN.PNG
     35   740      Desktops/320x212x12/LIST.XML
     36   109076   Desktops/320x212x12/MorroRock.png
     37   108087   Desktops/320x212x12/NantucketFlowers.png
     38   10820    Desktops/320x212x12/TN-CampusNight.png
     39   9657     Desktops/320x212x12/TN-CiscoFountain.png
     40   2089     Desktops/320x212x12/TN-CiscoLogo.png
     41   7953     Desktops/320x212x12/TN-Fountain.png
     42   7274     Desktops/320x212x12/TN-MorroRock.png
     43   9933     Desktops/320x212x12/TN-NantucketFlowers.png
     44   740      Desktops/320x212x16/LIST.XML
     45   740      Desktops/320x216x16/LIST.XML
     46   8224     Ringtones/Analog1.raw
     47   8307     Ringtones/Analog2.raw
     48   5280     Ringtones/AreYouThere.raw
     49   5040     Ringtones/AreYouThereF.raw
     50   8206     Ringtones/Bass.raw
     51   12240    Ringtones/CallBack.raw
     52   16066    Ringtones/Chime.raw
     53   8160     Ringtones/Classic1.raw
     54   16080    Ringtones/Classic2.raw
     55   10800    Ringtones/ClockShop.raw
     56   2823     Ringtones/DistinctiveRingList.xml
     57   9665     Ringtones/Drums1.raw
     58   13610    Ringtones/Drums2.raw
     59   15928    Ringtones/FilmScore.raw
     60   16244    Ringtones/HarpSynth.raw
     61   8245     Ringtones/Jamaica.raw
     62   16127    Ringtones/KotoEffect.raw
     63   12776    Ringtones/MusicBox.raw
     64   8223     Ringtones/Piano1.raw
     65   15422    Ringtones/Piano2.raw
     66   9360     Ringtones/Pop.raw
     67   7200     Ringtones/Pulse1.raw
     68   4000     Ringtones/Ring1.raw
     69   4000     Ringtones/Ring2.raw
     70   4000     Ringtones/Ring3.raw
     71   4000     Ringtones/Ring4.raw
     72   4000     Ringtones/Ring5.raw
     73   4000     Ringtones/Ring6.raw
     74   4088     Ringtones/Ring7.raw
     75   495      Ringtones/Ringlist.xml
     76   10858    Ringtones/Sax1.raw
     77   14233    Ringtones/Sax2.raw
     78   16100    Ringtones/Vibe.raw
     79   8095286  apps37sccp.1-3-4-0.bin
     80   2942935  apps31.8-5-3TH1-6.sbn
     81   2935993  apps42.8-5-3TH1-6.sbn
     82   2935993  apps45.8-5-3TH1-6.sbn
     83   2935993  apps75.8-5-3TH1-6.sbn
     84   2933329  apps41.8-5-3TH1-6.sbn
     85   2933329  apps70.8-5-3TH1-6.sbn
     86   2599169  APPSH-1.3.3.SBN
     87   2591877  APPS-1.3.3.SBN
     88   2118620  SYSH-1.3.3.SBN
     89   2103754  cvm70sccp.8-5-3TH1-6.sbn  [invalid checksum]
     90   2101414  cvm41sccp.8-5-3TH1-6.sbn  [invalid checksum]
     91   2100804  cvm45sccp.8-5-3TH1-6.sbn  [invalid checksum]
     92   2100554  cvm75sccp.8-5-3TH1-6.sbn  [invalid checksum]
     93   2100286  cvm31sccp.8-5-3TH1-6.sbn  [invalid checksum]
     94   2099070  cvm42sccp.8-5-3TH1-6.sbn  [invalid checksum]
     95   2083047  SYS-1.3.3.SBN  [invalid checksum]
     96   1939872  WLANH-1.3.3.SBN  [invalid checksum]
     97   1906272  SCCP69xx.8-5-3-0.zz  [invalid checksum]
     98   1892036  GUIH-1.3.3.SBN  [invalid checksum]
     99   1887312  jar75sccp.8-5-3TH1-6.sbn  [invalid checksum]
     100   1882934  jar45sccp.8-5-3TH1-6.sbn  [invalid checksum]
     101   1848343  GUI-1.3.3.SBN  [invalid checksum]
     102   1828410  jar70sccp.8-5-3TH1-6.sbn  [invalid checksum]
     103   1756328  jar42sccp.8-5-3TH1-6.sbn  [invalid checksum]
     104   1628021  jar41sccp.8-5-3TH1-6.sbn  [invalid checksum]
     105   1616425  jar31sccp.8-5-3TH1-6.sbn  [invalid checksum]
     106   1379535  WLAN-1.3.3.SBN  [invalid checksum]
     107   939293   TNUXH-1.3.3.SBN  [invalid checksum]
     108   896477   TNUX-1.3.3.SBN  [invalid checksum]
     109   537925   dsp41.8-5-3TH1-6.sbn  [invalid checksum]
     110   537925   dsp70.8-5-3TH1-6.sbn  [invalid checksum]
     111   524969   cnu45.8-5-3TH1-6.sbn  [invalid checksum]
     112   524917   cnu42.8-5-3TH1-6.sbn  [invalid checksum]
     113   524876   cnu75.8-5-3TH1-6.sbn  [invalid checksum]
     114   503753   cnu31.8-5-3TH1-6.sbn  [invalid checksum]
     115   500084   cnu70.8-5-3TH1-6.sbn  [invalid checksum]
     116   499644   cnu41.8-5-3TH1-6.sbn  [invalid checksum]
     117   496521   music-on-hold.au  [invalid checksum]
     118   340615   dsp31.8-5-3TH1-6.sbn  [invalid checksum]
     119   340615   dsp42.8-5-3TH1-6.sbn  [invalid checksum]
     120   340615   dsp45.8-5-3TH1-6.sbn  [invalid checksum]
     121   340615   dsp75.8-5-3TH1-6.sbn  [invalid checksum]
     122   264368   DSP69xx.0-0-0-3.zz  [invalid checksum]
     123   165355   B016-1-0-3.SBN  [invalid checksum]
     124   146463   B015-1-0-3.SBN  [invalid checksum]
     125   44896    BOOT69xx.0-0-0-14.zz  [invalid checksum]
     126   11601    CME-8-0-Full-Readme-v.1.0.txt  [invalid checksum]
     127   5134     7970-71-75-Background-readme-v1.txt  [invalid checksum]
     128   1916     MISC-1.3.3.SBN  [invalid checksum]
     129   4118     GUI/admin_user.html  [invalid checksum]
     130   677820   GUI/admin_user.js  [invalid checksum]
     131   1029     GUI/CiscoLogo.gif  [invalid checksum]
     132   639      GUI/CME_GUI_README.TXT  [invalid checksum]
     133   953      GUI/Delete.gif  [invalid checksum]
     134   16344    GUI/DOM.JS  [invalid checksum]
     135   864      GUI/downarrow.gif  [invalid checksum]
     136   6315     GUI/ephone_admin.html  [invalid checksum]
     137   4558     GUI/LOGOHOME.GIF  [invalid checksum]
     138   3978     GUI/normal_user.html  [invalid checksum]
     139   78428    GUI/normal_user.js  [invalid checksum]
     140   1347     GUI/Plus.gif  [invalid checksum]
     141   843      GUI/SXICONAD.GIF  [invalid checksum]
     142   174      GUI/Tab.gif  [invalid checksum]
     143   2496     GUI/telephony_service.html  [invalid checksum]
     144   870      GUI/UPARROW.GIF  [invalid checksum]
     145   10230    GUI/xml-test.html  [invalid checksum]
     146   3412     GUI/xml.template  [invalid checksum]
     147   12       OS79XX.txt
     148   130552   P00308010200.bin
     149   461      P00308010200.loads
     150   708448   P00308010200.sb2
     151   130956   P00308010200.sbn
     152   703535   cmterm-7940-7960-sccp.8-1-2.cop.sgn
    [239789964 bytes used, 281983088 available, 521773052 total]
    509544K bytes of ATA CompactFlash (Read/Write)
    RtrPod2#show telephony-service tftp-bindings
    tftp-server system:/its/united_states/7960-tones.xml alias United_States/7960-tones.xml
    tftp-server system:/its/united_states/7960-font.xml alias English_United_States/7960-font.xml
    tftp-server system:/its/united_states/7960-font.xml alias English_United_States/7920-font.xml
    tftp-server system:/its/united_states/7960-dictionary.xml alias English_United_States/7960-dictionary.xml
    tftp-server system:/its/united_states/7960-kate.xml alias English_United_States/7960-kate.xml
    tftp-server system:/its/united_states/7960-kate.xml alias English_United_States/7920-kate.xml
    tftp-server system:/its/united_states/SCCP-dictionary.xml alias English_United_States/SCCP-dictionary.xml
    tftp-server system:/its/SEPDEFAULT.cnf alias SEPDefault.cnf
    tftp-server system:/its/vrf1/XMLDefault.cnf.xml alias XMLDefault.cnf.xml

  • Which jar files should I use for javax.xml.transform.*?

    thanks

    You can use Apache's implementaion APIs for that. (Xalan.jar & xml-api.jar)
    http://xml.apache.org/xalan-j/trax.html

  • Weblogic.apache.xalan.xpath.dtm.DTMException:

    Hi,
    I got two different behaviors when trying to the XSLT processor:
    1) When running the XSLT processor using the XSLT JSP tag, everything works
    fine.
    2) When running the XSLT process from a Java program, got the following
    error:
    weblogic.apache.xalan.xpath.dtm.DTMException:
    at
    weblogic.apache.xalan.xpath.dtm.DTMProxy.getChildNodes(DTMProxy.java:
    255)
    at com.agilesoft.common.BOMRollUp.getRollupPrice(BOMRollUp.java:42)
    at java.lang.reflect.Method.invoke(Native Method)
    at
    weblogic.apache.xalan.xpath.XSLTJavaClassEngine.callJava(XSLTJavaClas
    sEngine.java:397)
    at
    weblogic.apache.xalan.xpath.XSLTJavaClassEngine.callFunction(XSLTJava
    ClassEngine.java:668)
    at
    weblogic.apache.xalan.xpath.ExtensionFunctionHandler.callFunction(Ext
    ensionFunctionHandler.java:282)
    at
    weblogic.apache.xalan.xpath.xml.XMLParserLiaisonDefault.extFunction(X
    My XSL file contains Java extension to call a Java program where it needs to
    call Element.getElementsByTagName() method,
    which causes the DTMException.
    I am using WebLogic 6.0sp2 on NT. Do I need to configure the default XSLT
    parser when running
    the processor from a Java program? Is it possible to get info. about the
    XSLT JSP tags are executing
    the XSLT processor?
    Thanks,
    Hien

    Hi,
    I got two different behaviors when trying to the XSLT processor:
    1) When running the XSLT processor using the XSLT JSP tag, everything works
    fine.
    2) When running the XSLT process from a Java program, got the following
    error:
    weblogic.apache.xalan.xpath.dtm.DTMException:
    at
    weblogic.apache.xalan.xpath.dtm.DTMProxy.getChildNodes(DTMProxy.java:
    255)
    at com.agilesoft.common.BOMRollUp.getRollupPrice(BOMRollUp.java:42)
    at java.lang.reflect.Method.invoke(Native Method)
    at
    weblogic.apache.xalan.xpath.XSLTJavaClassEngine.callJava(XSLTJavaClas
    sEngine.java:397)
    at
    weblogic.apache.xalan.xpath.XSLTJavaClassEngine.callFunction(XSLTJava
    ClassEngine.java:668)
    at
    weblogic.apache.xalan.xpath.ExtensionFunctionHandler.callFunction(Ext
    ensionFunctionHandler.java:282)
    at
    weblogic.apache.xalan.xpath.xml.XMLParserLiaisonDefault.extFunction(X
    My XSL file contains Java extension to call a Java program where it needs to
    call Element.getElementsByTagName() method,
    which causes the DTMException.
    I am using WebLogic 6.0sp2 on NT. Do I need to configure the default XSLT
    parser when running
    the processor from a Java program? Is it possible to get info. about the
    XSLT JSP tags are executing
    the XSLT processor?
    Thanks,
    Hien

Maybe you are looking for

  • Can't get Headphone and Mic to work with Skype

    Hello, I have a 3 year old Macbook Pro and I am running OS 10.8.3. I am trying to get my USB headphone and mic to work with Skype but I'm not having any success. I have tried several different headphones with the same result. I finally phoned Skype s

  • Unable to export to mobile.me album.

    Good afternoon. First, sorry to my bad english. I try to export an album on my gallery mobile.me but it is not possible Aperture say "the request to the server listening" and Aperture crashes and I must force quit. and it is OK with iPhoto. How to ge

  • 5800 email alerts

    How do I get e-mail alerts on my phone.  I've set this up on my hotmail account but don't know what to do on the phone.  I didn't find the user guide very useful:-( Thanks

  • Removed an edited folder from Catalog - Bad move?

    I have searched the forum for a specific answer, but I either overlooked it or failed to enter the exact search terms I needed.... I removed a folder of 173 edited DNG's from the Catalog. Don't ask why! Am I correct in assuming that all of the preset

  • My MacBook Pro won't start up please help me

    MacBook Pro won't start up what should I do?