RE: (forte-users) XML and XSL in Forte
We too (at Viking Freight) would also be very interested to see if anybody
has produced such a useful series of classes...
Frank Lees, Developer
-----Original Message-----
From: Amin, Kamran [mailto:kamran.aminframeworkinc.com]
Sent: Wednesday, January 19, 2000 12:11 PM
To: 'Forte User'
Subject: (forte-users) XML and XSL in Forte
Has anybody integrated an XSL parser with Forte. I know Forte provides us
with an XML parser but that does not help with parsing XSL. There a lot of
parsers written in JAVA but that will not integrate well with Forte. We
need something that will be easy to integrate with Forte. This parser will
take our XML and XSL to give us a result set. If anybody can comment on the
subject or share some information I would appreciate it.
thanks in advance.
ka
For the archives, go to: http://lists.sageit.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.sageit.com
Similar Messages
-
JSF, tiles, xml and xsl
Good days people, I am employed at an app that wants to integrate JSF, tiles, xml and xsl.
Basically the app receives information of the user's interfaz, builds an url with the above mentioned information and invokes to a service web that a xml returns with the information. The idea is to generate the exit in format html or wml with an insole(staff) xsl and to send the result in this format to every jsp that is going to form a part of the page that it will generate tiles. at first I understand that it is feasible, i�d like to know if someone already has done it and since it has done it.
Just now what I have is a managed bean that receives the parameters of the altar frontal and invokes a method of a service, like this:
public String encuentra(){
//deja los atributos privados rellenos.
String mensaje ;
crearYRellenarBusquedaVO();
try {
setResultado(this.getServicio().obtenerResultadosWML(this.getBusquedaVO()));
mensaje="succesNoJS";
}catch(java.lang.IllegalArgumentException e){
mensaje="error";
}catch(es.yell.frontlite.exceptions.SrvBusquedaNoxtrumServiceException e1){
mensaje="error";
}catch(Exception e2){
mensaje="error";
return mensaje;
public String obtenerResultadosWML(es.yell.frontlite.service.impl.BusquedaVO busquedaVO){
if (busquedaVO == null){
throw new IllegalArgumentException(
"obtenerResultadosJSdesactivado(es.yell.frontlite.service.impl.BusquedaVO busquedaVO) - 'busquedaVO' no puede ser nulo.");
try{
return this.manejarObtenerResultadosWML(busquedaVO);
}catch(es.yell.frontlite.exceptions.SrvBusquedaNoxtrumServiceException e1){
throw new es.yell.frontlite.exceptions.SrvBusquedaNoxtrumServiceException(
"Error ejecutando el servicio String obtenerResultadosJSdesactivado(es.yell.frontlite.service.impl.BusquedaVO busquedaVO). " + e1.getCause(),e1);
}catch(Exception e){
throw new es.yell.frontlite.exceptions.SrvBusquedaNoxtrumServiceException(
"Error ejecutando el servicio String obtenerResultadosJSdesactivado(es.yell.frontlite.service.impl.BusquedaVO busquedaVO). " + e.getCause(),e);
//it returns html code!
protected String manejarObtenerResultadosWML(es.yell.frontlite.service.impl.BusquedaVO busquedaVO)
throws java.lang.Exception{
try{
// xmlOrigen has full xml response from server
String xmlOrigen = manejarObtenerResultadosJSActivado(busquedaVO);
Source xmlSource = new StreamSource(new StringBufferInputStream(xmlOrigen));
Source xsltSource = new StreamSource(SrvBusquedaNoxtrumServiceImpl.class.getResourceAsStream(Constantes.XSL_FILE));
StringWriter cadenaSalida = new StringWriter();
Result bufferResultado = new StreamResult(cadenaSalida);
TransformerFactory factoriaTrans = TransformerFactory.newInstance();
Transformer transformador = factoriaTrans.newTransformer(xsltSource);
transformador.transform(xmlSource, bufferResultado);
System.out.println(cadenaSalida.toString());
return cadenaSalida.toString();
}catch(Exception e2){
throw new es.yell.frontlite.exceptions.SrvBusquedaNoxtrumServiceException (e2.getMessage());
With this exit in html, since(as,like) how could i forward it towards a jsp especially?
faces-config.xml
<navigation-rule>
<from-view-id>/index.jsp</from-view-id>
<navigation-case>
<from-outcome>succesNoJS</from-outcome>
<to-view-id>/jsDesactivado.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>error</from-outcome>
<to-view-id>/error.jsp</to-view-id>
</navigation-case>
</navigation-rule>
index.jsp
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<f:view>
<f:loadBundle basename="MessageResources" var="msg"/>
<head>
<title>
${msg.titulo}
</title>
</head>
<body>
<h:form id="formulario">
Que:
<h:inputText id="campoQue" value="#{yellProxy.campoQue}" />
Donde
<h:inputText id="campoDonde" value="#{ yellProxy.campoDonde}" />
<h:commandButton id="boton" value="Encuentra" action="#{yellProxy.encuentra}"/>
</h:form>
</f:view>
</body>
</html>
jsDesactivado.jsp
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%--
The taglib directive below imports the JSTL library. If you uncomment it,
you must also add the JSTL library to the project. The Add Library... action
on Libraries node in Projects view can be used to add the JSTL 1.1 library.
--%>
<%--
<%@taglib uri=" http://java.sun.com/jsp/jstl/core" prefix="c"%>
--%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
" http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h1>JSP Page</h1>
jsDesactivado!!
<%--
This example uses JSTL, uncomment the taglib directive above.
To test, display the page like this: index.jsp?sayHello=true&name=Murphy
--%>
<%--
<c:if test="${param.sayHello}">
<!-- Let's welcome the user ${param.name} -->
Hello ${param.name}!
</c:if>
--%>
<jsp:getProperty name="yellProxy" property="resultado"/>
</body>
</html>
If you could pass me a simple example of use of an app that uses JSF, tiles, xml and xsl, i�be grateful
regards a lot!We too (at Viking Freight) would also be very interested to see if anybody
has produced such a useful series of classes...
Frank Lees, Developer
-----Original Message-----
From: Amin, Kamran [mailto:kamran.aminframeworkinc.com]
Sent: Wednesday, January 19, 2000 12:11 PM
To: 'Forte User'
Subject: (forte-users) XML and XSL in Forte
Has anybody integrated an XSL parser with Forte. I know Forte provides us
with an XML parser but that does not help with parsing XSL. There a lot of
parsers written in JAVA but that will not integrate well with Forte. We
need something that will be easy to integrate with Forte. This parser will
take our XML and XSL to give us a result set. If anybody can comment on the
subject or share some information I would appreciate it.
thanks in advance.
ka
For the archives, go to: http://lists.sageit.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.sageit.com -
Cannot view PDF created by passing xml and XSL-FO using UTL_HTTP
Hi,
Using UTL_HTTP Iam trying to contact a servlet which uses the input XML and XSL/FO to produce a PDF.However, when I run the procedure , I get the following error 'File does not begin with -%PDF' ? I checked the output on the console and the blob values does not start with %PDF . Below is the sample from my code , please let me know if Iam commiting a mistake somewhere. I confirmed that the servlet itself is working fine by confirming with test webpage that takes xml and stylesheet input and generates a PDF when 'submitted' to servlet on the click of a button.
INSERT INTO TESTPDF ( PDF_REPORT ) VALUES ( Empty_Blob() ) RETURNING PDF_REPORT INTO vBlobRef;
vReportURL :='/rufop/fop?xml='||xmldoc||'&xsltRPath=../../test/PAXSL.xsl';
req := UTL_HTTP.BEGIN_REQUEST (url=>vReportURL, method=>'POST');
resp := utl_http.get_response(req);
loop
begin
Utl_Http.read_raw(resp, vData);
Dbms_Lob.writeAppend ( lob_loc => vBlobRef , amount => Utl_Raw.length(vData) , buffer => vData );
exception
when utl_http.end_of_body then
exit;
end;
end loop;
Utl_Http.end_response(resp);
owa_util.mime_header('application/pdf',false);
htp.p('Content-Disposition: inline; filename="test.pdf"');
htp.p('Content-Length: '|| dbms_lob.getlength(vBlobRef));
owa_util.http_header_close;
wpg_docload.download_file(vBlobRef);
Thanks in advance,
JenHello guys! I have been assigned the same task,i.e to generate pdf through xml using xsl stylesheet.
I have a procedure which is creating the xml and the stylesheet. But I have no idea how to write the procedure which passes this xml to fo engine. I am very new to this. Can anyone please share your thoughts with me so as how to accomplish this? By reading blogs on internet I figured I would have to use UTIL_HTTP but don't know how.
Sunny
Edited by: 887252 on May 29, 2012 1:24 AM -
How to save xml and xsl function to a data grid column
hi. wondering, i have a xml and a xsl file, and have the transform class, and so need to save the xml and the xsl file, and display the results on a particular data grid column and to loop through the data grid columns. so, how do i use the xml save function
class, any examples or point me to articles, where i can read how to do this. need to display a file, with a different colour and font. any ideas. thanks. marvin.hi. need to save a xml and xsl file and display the results on data grid. how do i do this. any
sample code or articles i can read about thanks. marvin.
http://startrekcafe.stevesdomain.net http://groups.yahoo.com/groups/JawsOz
Hi.
Okay, well, did ask on the msdn forums, and some one replied, and so, will paste the code he suggested.
But getting a lot of errors.
Can you help me out.
Where am I going wrong.
So, I can then get this to work, then it shows the colours and the fonts on the specified data grid.
Can you help.
Want to get this working and passed today if possible.
Will pasate the code and the errors below.
Can you help.
Where am I going wrong.
Marvin.
// Set up the data set.
DataSet ds =
new
DataSet();
// Set up the data table.
DataTable dt =
new
DataTable();
// Ad the data table to the data set.
ds.Tables.Add(dt);
// Write the xml document to the data grid column.
ds.WriteXML(@"c:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\CurrentCount.xml");
ds.WriteXML(@"c:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\OnOrder.xml");
ds.ReadXML(@"c:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\CurrentCount.xml");
ds.ReadXML(@"c:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\OnOrder.xml");
// Set up the data table and the data set and set to 0.
dgvDisplayData.DataSource = ds.Tables[0];
Error 1 Invalid token '(' in class, struct, or interface member declaration
C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs 215
18 WoodStocks
Error 2 Invalid token ')' in class, struct, or interface member declaration
C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs 215
21 WoodStocks
Error 3 Invalid token '(' in class, struct, or interface member declaration
C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs 219
16 WoodStocks
Error 4 Invalid token '(' in class, struct, or interface member declaration
C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs 221
16 WoodStocks
Error 5 Invalid token '(' in class, struct, or interface member declaration
C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs 222
15 WoodStocks
Error 6 Invalid token '(' in class, struct, or interface member declaration
C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs 223
15 WoodStocks
Error 7 Invalid token '=' in class, struct, or interface member declaration
C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs 227
31 WoodStocks
Error 8 Array size cannot be specified in a variable declaration (try initializing with a 'new' expression)
C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs 227
43 WoodStocks
Error 9 Invalid token ';' in class, struct, or interface member declaration
C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs 227
45 WoodStocks
Can you help me out.
Thanks.
http://startrekcafe.stevesdomain.net http://groups.yahoo.com/groups/JawsOz -
Revision: 15533
Revision: 15533
Author: [email protected]
Date: 2010-04-17 04:20:11 -0700 (Sat, 17 Apr 2010)
Log Message:
Back out some local changes to tomcat-users.xml and tomcat-users.xml.install I inadvertently checked in when upgrading ActiveMQ on BlazeDS/trunk.
Modified Paths:
blazeds/trunk/servers/apache-tomcat-6.0.14/conf/tomcat-users.xml
blazeds/trunk/servers/apache-tomcat-6.0.14/conf/tomcat-users.xml.installi will not read all that!!!! Format it! Lots of useless information commented.
java.net.SocketException: java.net.ConnectException: Connection timed out: connect
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)
Tells me you have a connection error on Mysql. Quick search show me this:
<Resource name="jdbc/passport" auth="Container"
type="javax.sql.DataSource" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://258.1.54.134:3306/xmnext_passport"
username="dda" password="zhoussda" maxActive="20" maxIdle="10"
maxWait="-1"/>
Can you connect to the server using thos setting with a mysql client in the server? -
Converting XML and XSL into HTML
Hello!
I'm designing a servlet class that merges an xml file and xsl file into html that will be sent to the client. But I don't understand how the (sparsely documented) javax.xml.transform.dom package works. An exception is generated for a missing "version" tag, when I've included one that has worked on client-side xml/xsl pages before. If it matters, I'm using Apache Tomcat/JDK 1.4.
Here's the code:package mypackage.servlet.xml;
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.xml.transform.*;
import javax.xml.transform.dom.*;
import javax.xml.parsers.*;
import org.w3c.dom.*;
import org.xml.sax.*;
public class XML2HTMLServlet extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
response.setContentType("text/html");
PrintWriter writer = response.getWriter();
try {
openFile("D:/Webdev/xml2html/data.xml", "D:/Webdev/xml2html/style.xsl", writer);
} catch (Exception e) {
e.printStackTrace(writer);
private void openFile(String xmlPath, String xslPath, PrintWriter writer)
throws IOException, ParserConfigurationException, SAXException,
TransformerConfigurationException, TransformerException {
File xmlFile = new File(xmlPath);
File xslFile = new File(xslPath);
TransformerFactory tFact = TransformerFactory.newInstance();
DocumentBuilderFactory dbFact = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = dbFact.newDocumentBuilder();
Document xmlDoc = builder.parse(xmlFile);
Document xslDoc = builder.parse(xslFile);
Node xmlDocNode = (Node)xmlDoc;
Node xslDocNode = (Node)xslDoc;
DOMSource xmlSrc = new DOMSource(xmlDocNode);
DOMSource xslSrc = new DOMSource(xslDocNode);
DOMResult htmlResult = new DOMResult();
Transformer transformer = tFact.newTransformer(xslSrc); // the exception occurs here!
When it runs, it complains:
javax.xml.transform.TransformerConfigurationException:
javax.xml.transform.TransformerConfigurationException:
javax.xml.transform.TransformerException:
javax.xml.transform.TransformerException: stylesheet requires attribute: version at
org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:767) at
mypackage.servlet.xml.XML2HTMLServlet.openFile(XML2HTMLServlet.java:49) at
...etc...etc...
data.xml contains:
<?xml version="1.0"?>
<document type="lecture">
<title>Test Data</title>
<section>
<name>A New Section</name>
</section>
</document>
style.xsl contains:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head>
<title><xsl:value-of select="document/title"/></title>
</head>
<body>
<xsl:apply-templates select="document/section"/>
</body>
</html>
</xsl:template>
<xsl:template match="section">
<div><i>Section</i><br/><xsl:value-of select="name"/></div>
</xsl:template>
</xsl:stylesheet>I'm not sure the method calls above are what I want, so here's the client-side equivalent in Internet Explorer 5.0:
function createStyledXMLDocument(xmlUrl, xslUrl) {
var xmlDocument = new ActiveXObject("Microsoft.XMLDOM");
xmlDocument.load(xmlUrl);
var xslDocument = new ActiveXObject("Microsoft.XMLDOM");
xslDocument.load(xslUrl);
return xmlDocument.transformNode(xslDocument);
}Any help would be greatly appreciated.Hi!
I found the immediate answer with
dbFact.setNamespaceAware(true);As for parser, I'm just using the default JDK install. But I'd like to hear more on Xalan. Is it independent open source? How does Xalan compare to whatever is default in JDK?
Thanks -
Generating PDF with XML and XSL
Hi, quick basic question...
I'm trying to generate pdf doc from xml with xsl.
I'm using following sample code from xml.apache.org
response.setContentType("application/pdf");
Driver driver =new Driver();
driver.setOutputStream(response.getOutputStream());
driver.setRenderer(Driver.RENDER_PDF);
Transformer transformer=TransformerFactory.newInstance()
.newTransformer(new StreamSource("foo.xsl"));
transformer.transform(xmlsource, new SAXResult(driver.getContentHandler()));
xmlSource is my regular xml that wants to be pdf.
is foo.xsl any regular xsl that I use to coonvert xml into html?
or is it some special xsl that is tailored for pdf.
Is this what is called xsl-fo?
Thanks
ILHi IL,
XSLT can translate XML to something else. It is most suited to transforming to another tree-like format (XML, HTML, etc.) but can be 'asked' to produce other kinds of output, flat text for example.
It is driven by an XSL file which is a series of patterns to match and output to produce.
This XSL file can be used to generate another XML document in which the nodes come from the Formatting Object namespace. These describe, in generic terms the format of an output document based upon the contents of the original XML.
The formatting object XML document can then be used as input to a formatting object XML processor which can generate PDF output from it.
You may want to check out:
www.w3c.org
for all the stuff on XML, XSL, XSLT, Formatting Objects, etc., and:
xml.apache.org
for imformation on Xalan, which is an XSL processor and FOP, which is a formatting object processor.
Hope that helps,
Peter. -
How to generate HTML from XML and XSL?
Hi all,
I am new to XML.
Can I somehow see the HTML-Output of the XML-File, when I have the XSL-File too, but don't use any XML-Editor (XMLSpy) and FOP? I do not want use any additional tools - only the database tools.
What I need for this?
Do I need the XSLT-File too?
I am waiting for your answers, when possible with examples please.
Regards
Leonid PavlovPlease post on the General XML forum.
-
How can I use JavaScript extention functions with Xalan for transforming XML with XSL
While transforming standart XML and XSL files to HTML with this servlet:
package mypackage1;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
import java.net.URL;
import javax.xml.transform.*;
import javax.xml.transform.stream.StreamSource;
import javax.xml.transform.stream.StreamResult;
import org.mozilla.javascript;
public class Servlet2 extends HttpServlet
private static final String CONTENT_TYPE = "text/html; charset=windows-1252";
public void init(ServletConfig config) throws ServletException
super.init(config);
public void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException
try
response.setContentType(CONTENT_TYPE);
PrintWriter out = response.getWriter();
TransformerFactory tFactory = TransformerFactory.newInstance();
Source xmlSource = new StreamSource(new FileReader("c:/aaa.xml"));
Source xslSource = new StreamSource(new FileReader("c:/bbb.xsl"));
Transformer transformer = tFactory.newTransformer(xslSource);
transformer.transform (xmlSource, new StreamResult(out));
catch (Exception e)
e.printStackTrace();
everything is going ok,
but when try to use javascript function in XSL file, for example like in this:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:lxslt="http://xml.apache.org/xslt" xmlns:my-ext="ext1"
extension-element-prefixes="my-ext">
<lxslt:component prefix="my-ext"
functions="getdate">
<lxslt:script lang="javascript">
function getdate() {
var d = new Date();
return d.toUTCString();
</lxslt:script>
</lxslt:component>
<xsl:template match="/">
<p><xsl:copy-of select="my-ext:getdate()"/></p>
</xsl:template>
</xsl:stylesheet>
recieve error-message:
XSL-1000: (Fatal Error) Error while parsing XSL file (Extension function namespace should start with 'http://www.oracle.com/XSL/Transform/java/'.).
What kind of namespace I should specify?Hello, Paul.
I'm sure you may not use JavaScript as a language for creating XSLT extention functions with Oracle XDK Parser. This is since parser might have JavaScript interpreter to work with JavaScript, but it has not.
If you need to build any XSLT extention functions you must build them as Java class' static methods.
After that, you define the usage of the class by mean of namespace declaration as:
xmlns:your-ns="http://www.oracle.com/XSL/Transform/java/yourpackage.Yourclass"
(Prefix "http://www.oracle.com/XSL/Transform/java/" may differs if you use non-Oracle XML parser)
and use class' static method in XSLT:
<xsl:value-of select="your-ns.staticMethodName(paramsIfAny)"/>
In your case you may wish to use standard Date class:
xmlns:date="http://www.oracle.com/XSL/Transform/java/java.util.Date"
<xsl:value-of select="date:toString(date:new)"/> -
Unable to display a variable value in xml through xsl using coldfusion
Hi ColdFusion Heroes ,
Is their any one to help me in this issue . I am new to cold
fusion , XML and XSL .
Detail Explaination :
develoment_files.cfm is a .cfm page , which includes an xml
page .
development_files_dropdown.xsl is a xsl page .
develoment_files.cfm : Code is as follows .
<CFDIRECTORY ACTION="LIST" DIRECTORY="#somepath#"
NAME="DirContents" FILTER="p*">
<CFQUERY DBTYPE="query" NAME="Files">
SELECT *
FROM DirContents
WHERE Type = 'File'
</CFQUERY>
<CFOUTPUT><?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet type="text/xsl"
href="../XSL/development_files_dropdown.xsl"?>
<Test xmlns:xsi='
http://www.w3.org/2001/XMLSchema-instance'>
<CFLOOP QUERY="Files">
<Directory>
<DisplayName>#Name#</DisplayName>
<FullPath>#Name#</FullPath>
</Directory>
</cfloop>
</Test></CFOUTPUT>
This file generates a query resulting files starting with p*
and then it should be a file and manipulates in xml.
development_files_dropdown.xsl pages is as follows.
<?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes"/>
<xsl:preserve-space elements="*"/>
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="Test">
<B>Script Name: </B>
<select name="T1_Dev_Script" CLASS="DevInput">
<xsl:for-each select="Directory">
<option>
<xsl:attribute name="value">
<xsl:value-of select="FullPath/text()"/>
</xsl:attribute>
<xsl:value-of select="DisplayName/text()"/>
</option>
</xsl:for-each>
</select>
</xsl:template>
</xsl:stylesheet>
This is only for the purpose of display .
Now i want to get one particular file named "pfile" { Code is
written in development_files.cfm page and kept it in a variable } I
want to display it in #Name# filed. how can i do that ? I am
getting XML Parsing error from javascript .
Could any one look into this .
Thanks & Regards,
Nataraj GThe first part is right -
1) drag a text element onto the page, at a location in which you want the variable value to be displayed
2) On the left hand bottom page - go to the web item properties for the text element
3) scroll down to the specific properties for the item - in that uncheck the first two check boxes - display general text elements & display static filter values
4) in the next item in the properties (List of text elements) click once on the box where List is written and then clcik on the small browse button that appears.
5) in the window that opens, in the element type field, select variable/variable value as key (as per your requirement) and then under the element ID field type in the technical name of your variable that you want to display.
click ok and save your template and try executing it.
See if this solves your problem.
regards,
Nikhil -
Hi all,,
Im just looking for some help with a java xml passer program. Im trying to create a program that will read specific tags and the values that are represented by these tags in the xml file..I have found the following code
import java.io.File;
import org.w3c.dom.Document;
import org.w3c.dom.*;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
public class ReadAndPrintXMLFile{
public static void main (String argv []){
try {
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
Document doc = docBuilder.parse (new File("book.xml"));
// normalize text representation
doc.getDocumentElement ().normalize ();
System.out.println ("Root element of the doc is " + doc.getDocumentElement().getNodeName());
NodeList listOfPersons = doc.getElementsByTagName("person");
int totalPersons = listOfPersons.getLength();
System.out.println("Total no of people : " + totalPersons);
for(int s=0; s<listOfPersons.getLength() ; s++){
Node firstPersonNode = listOfPersons.item(s);
if(firstPersonNode.getNodeType() == Node.ELEMENT_NODE){
Element firstPersonElement = (Element)firstPersonNode;
NodeList firstNameList = firstPersonElement.getElementsByTagName("first");
Element firstNameElement = (Element)firstNameList.item(0);
NodeList textFNList = firstNameElement.getChildNodes();
System.out.println("First Name : " + ((Node)textFNList.item(0)).getNodeValue().trim());
NodeList lastNameList = firstPersonElement.getElementsByTagName("last");
Element lastNameElement = (Element)lastNameList.item(0);
NodeList textLNList = lastNameElement.getChildNodes();
System.out.println("Last Name : " + ((Node)textLNList.item(0)).getNodeValue().trim());
NodeList ageList = firstPersonElement.getElementsByTagName("age");
Element ageElement = (Element)ageList.item(0);
NodeList textAgeList = ageElement.getChildNodes();
System.out.println("Age : " + ((Node)textAgeList.item(0)).getNodeValue().trim());
}//end of if clause
}//end of for loop with s var
}catch (SAXParseException err) {
System.out.println ("** Parsing error" + ", line " + err.getLineNumber () + ", uri " + err.getSystemId ());
System.out.println(" " + err.getMessage ());
}catch (SAXException e) {
Exception x = e.getException ();
((x == null) ? e : x).printStackTrace ();
}catch (Throwable t) {
t.printStackTrace ();
//System.exit (0);
}//end of main
}Im trying to develop this code to work with podcast xml files..Im having a few issuses with this program.. Is there anyone out there that has created a program like this that works with podcast xml files??
Anyone got any suggestions.Please.XML and XSL transformations can be done using most languages and in Java there is strong support for these techniques.
It worries me a little bit that you ask this question though. XML and XSL are no more than a tool to solve SOME problems, but I get the idea that you want to put them on your resume as if they are your main talent. The tool set of the developer is much broader than just some techniques to format and transform data, you need to be able to solve problems in the most efficient way possible, not limiting yourself to only a handful of techniques that you just happen to know a lot about.
What I am trying to say is: it is always good to have knowledge of these techniques, but don't go thinking it is going to guarantee you a job. -
Hi,
In our project, we generate reports using xalan parser in PDF and HTML formats. Now, my client wants them to be generated in RTF (Ms Word) format as well. As this is not possible using xalan, I tried to find out other parsers. I found one JFOR which generates RTFdocs from XSLFO. What I have is only XML and XSL documents. How can I get XSLFO document using these two? Is there any parser which generates XSLFO docs using XML and XSL? Or is there any parser which generates RTF docs directly from XML and XSL?
Thanks
JagadeeshAs this is not possible using xalanWhy is it not possible? RTF is a text format as far as I know, and you can output text from XSLT.
-
Re: (forte-users) SAXParser and InputSource
Michael Beaulieu wrote on Mon November 8:
Hello,
I was wondering if anyone has any experience using the XMLParser
Library!? in Forte. I have no problem parsing a file using the
forte parser but when I try to parse a message/TextData object I get
the error " element not found " ( which is not due to my xml file )
The class InputSource has a method that takes SeekStream in its
setCharacterStream method:
str : MemoryStream = new();
str.open(SP_AM_READ_WRITE);
str.WriteText(myMessage);
theSource : InputSource = new();
theSource.setCharacterStream(str);
myParser.parse(theSource);Add this line after you're done writing to the MemoryStream:
str.Seek(position=0);
When the SAX parser is reading, it's reading from the current position
forward; after writing to the stream the current position is at the
end, so you have to rewind it to the beginning before giving it to the
SAX parser.
Cliff Draper
Forte Engineering
Forte Software, a subsidiary of SunWhy not this:
while myText.moveToString(' ') do
myText.ReplaceRange('-', myText.Offset, myText.Offset+1);
end while;
or if you prefer verbosity:
while myText.moveToString(source=' ') do
myText.ReplaceRange(source='-', startOffset=myText.Offset,
endOffset=myText.Offset+1);
end while;
-----Original Message-----
From: FatchJeBAM.com [mailto:FatchJeBAM.com]
Sent: Wednesday, January 12, 2000 2:51 PM
To: Troy.Burnsvacationclub.com; kamranaminyahoo.com
Subject: RE: (forte-users) search and replace within a TextData
How about this?? May have to play with start/end on ReplaceRange as I
didn't really test this
Anybody got a better way??
-- replace space with underscore
For x in 1 to myTextdata.LengthToEnd() do
If myTextData.IsSpace() then
MyTextdata.ReplaceRange('_'. Startoffset=myTextdata.offset,
endoffset=myTextdata.offset+1);
End if;
MyTextdata.MoveNext;
End for;
Jerry Fatcheric
-----Original Message-----
From: Burns, Troy [mailto:Troy.Burnsvacationclub.com]
Sent: Wednesday, January 12, 2000 9:40 AM
To: kamranaminyahoo.com
Subject: (forte-users) search and replace within a
TextData
Hello all,
I need to search within a textdata object, replacing all
occurrances of a
space
with another character. Can you give a quick code example
of how I would do
this?
Thanks in advance,
Troy
Troy Burns
Marriott Vacation Club Intl.
E-mail: troy.burnsvacationclub.com
Phone: (941) 688-7700 ext. 4408
For the archives, go to: http://lists.sageit.com/forte-users
and use
the login: forte and the password: archive. To unsubscribe,
send in a new
email the word: 'Unsubscribe' to:
forte-users-requestlists.sageit.com
For the archives, go to: http://lists.sageit.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.sageit.com -
RE: (forte-users) XML Parser - Reading an XML document intothe Document
Hi Laks
Here is an example of converting a XML doc to a DOM object.
The method is ParseXML(pXMLString:TextData, pListType:CSAListInterface).
Hope this helps.
Argyris Simakis
Corporate Services Applications ITB
Sydney AUSTRALIA
-----Original Message-----
From: Narayanan, Lakshmi [mailto:lnarayanoxhp.com]
Sent: Thursday, April 06, 2000 8:31 AM
To: 'kamranaminyahoo.com'
Subject: (forte-users) XML Parser - Reading an XML document into the
Document Object
Importance: High
Hi guys,
I have been trying to read an XML file and feed it into the XMLParser.
I have read about the DOM API, and i can work with the DOM API in java
scripts. How
will i play with it in TOOL implementation of DOM API. Can anyone guide me
in this
process.
Thanks for your help.
Laks
For the archives, go to: http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.comHi Laks
Here is an example of converting a XML doc to a DOM object.
The method is ParseXML(pXMLString:TextData, pListType:CSAListInterface).
Hope this helps.
Argyris Simakis
Corporate Services Applications ITB
Sydney AUSTRALIA
-----Original Message-----
From: Narayanan, Lakshmi [mailto:lnarayanoxhp.com]
Sent: Thursday, April 06, 2000 8:31 AM
To: 'kamranaminyahoo.com'
Subject: (forte-users) XML Parser - Reading an XML document into the
Document Object
Importance: High
Hi guys,
I have been trying to read an XML file and feed it into the XMLParser.
I have read about the DOM API, and i can work with the DOM API in java
scripts. How
will i play with it in TOOL implementation of DOM API. Can anyone guide me
in this
process.
Thanks for your help.
Laks
For the archives, go to: http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com -
RE: (forte-users) XML Parser - Reading an XML document intothe D ocumen
Hi Simakis,
Your attachments explained the exact start i was looking for.
Thanks a lot for sharing.
Thanks
Laks
-----Original Message-----
From: Simakis, Argyris [mailto:Argyris.Simakisdet.nsw.edu.au]
Sent: Thursday, April 06, 2000 12:35 AM
To: 'Narayanan, Lakshmi'
Cc: 'kamranaminyahoo.com'
Subject: RE: (forte-users) XML Parser - Reading an XML document into the
D ocument Object
Hi Laks
Here is an example of converting a XML doc to a DOM object.
The method is ParseXML(pXMLString:TextData, pListType:CSAListInterface).
Hope this helps.
Argyris Simakis
Corporate Services Applications ITB
Sydney AUSTRALIA
-----Original Message-----
From: Narayanan, Lakshmi [mailto:lnarayanoxhp.com]
Sent: Thursday, April 06, 2000 8:31 AM
To: 'kamranaminyahoo.com'
Subject: (forte-users) XML Parser - Reading an XML document into the
Document Object
Importance: High
Hi guys,
I have been trying to read an XML file and feed it into the XMLParser.
I have read about the DOM API, and i can work with the DOM API in java
scripts. How
will i play with it in TOOL implementation of DOM API. Can anyone guide me
in this
process.
Thanks for your help.
Laks
For the archives, go to: http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.comHi Simakis,
Your attachments explained the exact start i was looking for.
Thanks a lot for sharing.
Thanks
Laks
-----Original Message-----
From: Simakis, Argyris [mailto:Argyris.Simakisdet.nsw.edu.au]
Sent: Thursday, April 06, 2000 12:35 AM
To: 'Narayanan, Lakshmi'
Cc: 'kamranaminyahoo.com'
Subject: RE: (forte-users) XML Parser - Reading an XML document into the
D ocument Object
Hi Laks
Here is an example of converting a XML doc to a DOM object.
The method is ParseXML(pXMLString:TextData, pListType:CSAListInterface).
Hope this helps.
Argyris Simakis
Corporate Services Applications ITB
Sydney AUSTRALIA
-----Original Message-----
From: Narayanan, Lakshmi [mailto:lnarayanoxhp.com]
Sent: Thursday, April 06, 2000 8:31 AM
To: 'kamranaminyahoo.com'
Subject: (forte-users) XML Parser - Reading an XML document into the
Document Object
Importance: High
Hi guys,
I have been trying to read an XML file and feed it into the XMLParser.
I have read about the DOM API, and i can work with the DOM API in java
scripts. How
will i play with it in TOOL implementation of DOM API. Can anyone guide me
in this
process.
Thanks for your help.
Laks
For the archives, go to: http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com
Maybe you are looking for
-
Right now my 12 yr old somehow is able to purchase. From iTunes using my credit card- our. Accounts must be linked How do I get him off my account? I know his Apple ID &. Password
-
Hi, all, I have an item validation that fails. When the page reloads, I see the following in the debug output: Do not run process "P41_BEFORE_HEADER", process point=BEFORE_HEADER, condition type=, when button pressed=If that process doesn't run, a fl
-
Separating business Tier from presentation tier your opinion welcom
Hi' I'va a business object which data members are stored in DB. The question is while I'm creating new object should I return exception to the presentation tier if object doesn't exist in DB(it's data members) or should I initialize object with empty
-
LR3 JPEG/DNG Metadata Confusion
Hi, I'm a little confused about XMP data and the LR3 catalog itself. First, I understand that DNG files can have embedded keywords and other metadata -- and 95% of my files are CR2 files that I bring into LR3 as DNGs and keep them as DNGs. So I am N
-
Hello Everyone, I was reviewing the allocation information from SDN and had a quick question: //*WHEN ALL_ENTITY //*IS "ASA" // *REC (EXPRESSION=$ASARENT$,ALLOCATION_TIME=2010.JAN,ALLOC_CATEGORY=PLAN) //*ENDWHEN //*COMMIT Could someone please ex