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

October 11

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"?>
     <page id="/marys_page" name="Mary's Page"">
          <content_contact ntid="smithm" />
          <technical_contact ntid="techguy" />
</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.



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


  1. migo stock type
  2. sap alv ADD_PROTOCOL_ENTRY save
  3. set cfl in udf text box in sap
  4. Neha jpx pothos
  5. sapjco3 Connect to SAP gateway failed
  6. UAFT
  7. gladpng
  8. tonightyeq
  9. spinx1l
  10. suddenlyki9
Copyrights 2019 Fcffair BigData Resource, All rights reserved