XSLT, using document() to fetch a local JSP generated XML file

Advertisement
October 11

All,
I have 1 XML document that keeps track of various subsite owners of a domain I manage. The xml file doesn't hold much, something along the lines of:
<?xml version="1.0"?>
<sitedirectory>
     <page id="/marys_page" name="Mary's Page"">
          <content_contact ntid="smithm" />
          <technical_contact ntid="techguy" />
     </page>
</sitedirectory>Now I also have a JSP page, that when given an NT id as a URL parameter, rifles through LDAP and spits out an xml document with all the relavent ISID fields for that person's id (first name, last name, phone number, e-mail address etc).
I use the document() function in an XSL file to access that dynamic JSP page, fetch the contents of the resulting XML file. Using the document() function with just a regular file call like "getldap.jsp" only feeds my stylesheet the source of that JSP file, not the resulting XML file that I'm looking for when it's been processed.
So... I have my document() function calling the full URL to that JSP file on my domain, an example <value-of /> call in my XSL file would be:
<xsl:value-of select="document('http://my.domain.com/jsp_util/ldap_person.jsp?ntid=smithm')/person/firstname" />and I get what I want, that person's first name, drawn from LDAP into my XSL file. But it seems a little weird to me, having a server-side transformation, accessing a JSP file by making an http call to the same server the transformation resides in.
Am I missing something? Is there a better way to do this or some directive I'm missing? I'd appreciate any help.

Advertisement

Replay

That's a creative but perfectly reasonable way to use the document() function.
There are other ways to solve the problem, such as including Java calls in your XSL and applying a customized URIResolver to your transformation, but my approach would be to use the simplest method that works acceptably. So if you don't have performance problems with your solution, I would leave it alone.

View 2 Replies

How do I generate XML File Using JDeveloper 9.0.3

October 11

Hi All I want to generate a XML file against the data in one of my Oracle table,,,, This is the first time I am doing this Task, so please let me know whether I am going through the correct path, or if not appreciate if you could put me to the correc

View All Replies

XSLT Using document() reference XML DB object

October 11

I have two XML structured documents loaded in XML DB, and I use transform on x1.xml with a style sheet that contains : <xsl:apply-templates select="document('x2.xml')"/> what's the best way to reference the x2.xml found in the database usi

View All Replies

JSP, XML, XSLT: applying XSL on JSP-generated XML doc

October 11

Hello, I am currently trying to figure out how to do the following: let's consider (that's not entirely hypothetical :) ) a web application working with JSP (on apache/tomcat 3.1) and oracle BC4J Application modules. The JSPs call oracle webbeans to

View All Replies

Writing an XML file from JSP

October 11

Hi for some this question will seem to be a stupid, but i am really confused how can i write an XML file from with in JSP code. should i have to use same FileOutPutStream. Actually i am trying to make reports using Jasper api. It demands for an XML f

View All Replies

How to break up a huge XML file and generate serialized JSP pages

November 30

I have a huge xml file, with about 100 <item> nodes. I want to process this xml file with pagination and generate jsp pages. For example: Display items from 0 to 9 on page 1 page1.jsp , 10 to 19 on page2.jsp, and so on... Is it possible to generate

View All Replies

How to Update existing XML File Using Java Swing

October 11

Hi, I am reading XML file and getting keywords into JList. When i add some keywords into JList through textfield and remove keywords JList, then after click on save button it should update xml file. How can i do it ? Please provide me some code tips

View All Replies

Using SQL/XML Functions or XSU to generate structured XML file.

November 30

Hi, I have a view on a relational database I need to generate an XMLfile based on that view. I need to have below structure <Employees> <Employee A> <Employee info> </Employee info> < Contact info> <Address> </Addres

View All Replies

SAX: How to create new XML file using SAX parser

November 30

Hi, Please anybody help me to create a XML file using the Packages in the 5.0 pack of java. I have successfully created it reading the tag names and values from database using DOM but can i do this using SAX. I am successful to read XML using SAX, no

View All Replies

How to set customized wallpaper using MDT unattended.xml file

October 11

hello I need to set own wallpaper  with OSD using MDT. I have edited the unattended.xml file  as added below component to it, other customization with answer file worked except not getting set the wallpaper set and wallpaper  image is available at sp

View All Replies

Publication using "one database fetch for all recepients" is a failure

November 30

Hi, I have created a Publication in *CMC* with Crystal Reports as Source Document. When I schedule it with option " One database fetch per recipient" it is a Success. But while using the option "One database fetch for all recipients" i

View All Replies

Publication using 'One database fetch for all recipients' is a Failure

November 30

Hi, I have created a Publication in CMC with Crystal Reports as Source Document. When I schedule it with option " One database fetch per recipient" it is a Success. But while using the option "One database fetch for all recipients" it

View All Replies

Generating excel files using XSLT mapping

October 11

Hi All, I am working on a proxy to file scenario and we have a requirement of generating .xls file in a spreadsheet format at FTP server.I have done xslt mappping for creating the excel file in spreadsheet.But getting following error in channel monit

View All Replies

Split an XML File and invoke a Web Serivce for each splits using an  XSLT

October 11

Hi, We Have a requirement to Split an incoming XML File into chunks based on a child element and hit the target Web Service for each and every split ( i.e no of splits = no of hits on WebService). Currently, the incoming XML file is getting splitted

View All Replies

How to update/write to a XML file using JSP?

November 30

If a user enters information in a form, is there any way to write this information into an existing XML document using JSP? Basically, I want my users to be able to add new information into an XML file but I have no idea how to do it. Help appreciate

View All Replies

Most recently used documents

November 30

How do I delete the MRU files within StarOffice 6.0? Is there a way to configure the program so that a file's location and file is not displayed under the "Files" menu?Hi The history of loaded URLs (ie the most recently used documents) are saved

View All Replies

I want to use the method getRemotePort() in a jsp page.....................

October 11

I have tried using it like this: <%@ page import="java.net.*"%> <%@ page import="java.util.*"%> <%@ page import = "javax.servlet.*"%> <% out.println("<br>Remote Port : " + request.getRemot

View All Replies

Use DOM to get the element value of XML document?

November 30

I can not to use the method getNodeValue to get the element value of XML document. How can I do for it? For example, for element <address>125 Smith Avenue</address> how to get the value "125 Smith Avenue" by using DOM? ThanksThanks f

View All Replies

Using a local XML file for parsing - iPhone

November 30

Good afternoon everyone. I am trying to create an application for the iPhone that will use an XML file for it's data source. I have been attempting to convert the SeismicXML application from the dev center to use a locally stored file, but to no avai

View All Replies

Use jsp to read xml file

November 30

Gents, I'm a XML & JSP newbie and try to do the following: I have a xml file which can be opened with a browser so that I can see data (let's say my cd collection). Further I have a xls file which makes the display a little nicer, with colors and so.

View All Replies

Tags:

  1. time capsule 500g default ip address
  2. troubleshoot software hpwindow7
  3. cfl on pdf text box in sap
  4. 0056 error code sccm
  5. PEXR 2002
  6. bapi_po_create1 extension
  7. claiming primary bt id status
  8. backup-spsite when to use sqlsnapshot
  9. ILF8
  10. DCD5
Copyrights 2019 Fcffair BigData Resource, All rights reserved