XML/XSLT problem

I'm currently reading info on using XSLT with XML documents ("Java Server Programming" by WROX), but I'm having quite a few problems getting anything to work. Can someone point me to a page/document that simply explains what .jar files to install, where to get them and where to place them to enable parsing XML files and using XSLT? I'm running jdk1.3.1_02.
Thank You
Tom Berry

- download: http://java.sun.com/xml/downloads/javaxmlpack.html
- install JAXP
- follow the XSLT tutorial: http://java.sun.com/webservices/docs/1.0/tutorial/doc/JAXPXSLT.html
- have fun!

Similar Messages

  • XML-XSLT problem. Please help

    I want to apply an XSLT to my XML to retrieve an element "firstName"
    My XSLT is as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html"/>
    <xsl:template match="customer">
    <html>
    <xsl:apply-templates/>
    </html>
    </xsl:template>
    <xsl:template match="customerBank">
    <b>
    <xsl:value-of select="preceding-sibling::customerAddress/street"/>
    </b>
    </xsl:template>
    </xsl:stylesheet>
    Expected Output should be:
    Jonathan
    Chadrick
    Antonia
    Diane
    Jennifer
    Andrea
    Michael
    Mario
    My Output is :
    JonathanGold32
    Jonathan
    First National TrustEarthfarm Investment BankEF00123456789123456789012VISA ChadrickPowell45
    Chadrick
    First National TrustEF00123456789123456789012VISASnowboarding AntoniaSuares28
    Antonia
    Investment Corporate HoldingsEF00123456789123456789012VISAKayaking DianeChristoff31
    Diane
    Investment Corporate HoldingsEF00123456789123456789012VISABeach JenniferWestlein41
    Jennifer
    Investment Corporate HoldingsEF00123456789123456789012VISAKayaking AndreaDesroaches33
    Andrea
    Investment Corporate HoldingsEF00123456789123456789012VISATrekking MichaelSeva21
    Michael
    Investment Corporate HoldingsEF00123456789123456789012VISACity breaks MarioGinelli34
    Mario
    Investment Corporate HoldingsEF00123456789123456789012VISAKayaking
    Why are the information from other node coming. Please clarify.
    My XML is
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xml" href="cuetomer.xml?>
    <customerList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="customerList.xsd">
         <customer customerID="jgol001">
              <customerName>
                   <firstName>Jonathan</firstName>
                   <lastName>Gold</lastName>
                   <age>32</age>
              </customerName>
              <customerAddress>
                   <street>4801 Long Street</street>
                   <city>Earthfarm</city>
                   <country>USA</country>
                   <phoneNumber>123-456-7890</phoneNumber>
                   <emailAddress>[email protected]</emailAddress>
              </customerAddress>
              <customerBank>
                   <bankName>First National Trust</bankName>
                   <bankName>Earthfarm Investment Bank</bankName>
                   <IBAN>EF00123456789</IBAN>
                   <creditCardNum>123456789012</creditCardNum>
                   <creditCardType>VISA</creditCardType>
              </customerBank>
         </customer>
         <customer customerID="cpow001">
              <customerName>
                   <firstName>Chadrick</firstName>
                   <lastName>Powell</lastName>
                   <age>45</age>
              </customerName>
              <customerAddress>
                   <street>4802 Long Street</street>
                   <city>Earthfarm</city>
                   <country>USA</country>
                   <phoneNumber>123-456-7890</phoneNumber>
                   <emailAddress>[email protected]</emailAddress>
              </customerAddress>
              <customerBank>
                   <bankName>First National Trust</bankName>
                   <IBAN>EF00123456789</IBAN>
                   <creditCardNum>123456789012</creditCardNum>
                   <creditCardType>VISA</creditCardType>
              </customerBank>
              <vacationPref>Snowboarding</vacationPref>
         </customer>
         <customer customerID="asua001">
              <customerName>
                   <firstName>Antonia</firstName>
                   <lastName>Suares</lastName>
                   <age>28</age>
              </customerName>
              <customerAddress>
                   <street>4803 Long Street</street>
                   <city>Earthfarm</city>
                   <country>France</country>
                   <phoneNumber>123-456-7890</phoneNumber>
                   <emailAddress>[email protected]</emailAddress>
              </customerAddress>
              <customerBank>
                   <bankName>Investment Corporate Holdings</bankName>
                   <IBAN>EF00123456789</IBAN>
                   <creditCardNum>123456789012</creditCardNum>
                   <creditCardType>VISA</creditCardType>
              </customerBank>
              <vacationPref>Kayaking</vacationPref>
         </customer>
         <customer customerID="asua006">
              <customerName>
                   <firstName>Diane</firstName>
                   <lastName>Christoff</lastName>
                   <age>31</age>
              </customerName>
              <customerAddress>
                   <street>4803 Long Street</street>
                   <city>Earthfarm</city>
                   <country>Germany</country>
                   <phoneNumber>123-456-7890</phoneNumber>
                   <emailAddress>[email protected]</emailAddress>
              </customerAddress>
              <customerBank>
                   <bankName>Investment Corporate Holdings</bankName>
                   <IBAN>EF00123456789</IBAN>
                   <creditCardNum>123456789012</creditCardNum>
                   <creditCardType>VISA</creditCardType>
              </customerBank>
              <vacationPref>Beach</vacationPref>
         </customer>
         <customer customerID="asua005">
              <customerName>
                   <firstName>Jennifer</firstName>
                   <lastName>Westlein</lastName>
                   <age>41</age>
              </customerName>
              <customerAddress>
                   <street>4803 Long Street</street>
                   <city>Earthfarm</city>
                   <country>UK</country>
                   <phoneNumber>123-456-7890</phoneNumber>
                   <emailAddress>[email protected]</emailAddress>
              </customerAddress>
              <customerBank>
                   <bankName>Investment Corporate Holdings</bankName>
                   <IBAN>EF00123456789</IBAN>
                   <creditCardNum>123456789012</creditCardNum>
                   <creditCardType>VISA</creditCardType>
              </customerBank>
              <vacationPref>Kayaking</vacationPref>
         </customer>
         <customer customerID="asua004">
              <customerName>
                   <firstName>Andrea</firstName>
                   <lastName>Desroaches</lastName>
                   <age>33</age>
              </customerName>
              <customerAddress>
                   <street>4803 Long Street</street>
                   <city>Earthfarm</city>
                   <country>USA</country>
                   <phoneNumber>123-456-7890</phoneNumber>
                   <emailAddress>[email protected]</emailAddress>
              </customerAddress>
              <customerBank>
                   <bankName>Investment Corporate Holdings</bankName>
                   <IBAN>EF00123456789</IBAN>
                   <creditCardNum>123456789012</creditCardNum>
                   <creditCardType>VISA</creditCardType>
              </customerBank>
              <vacationPref>Trekking</vacationPref>
         </customer>
         <customer customerID="asua003">
              <customerName>
                   <firstName>Michael</firstName>
                   <lastName>Seva</lastName>
                   <age>21</age>
              </customerName>
              <customerAddress>
                   <street>4803 Long Street</street>
                   <city>Earthfarm</city>
                   <country>UK</country>
                   <phoneNumber>123-456-7890</phoneNumber>
                   <emailAddress>[email protected]</emailAddress>
              </customerAddress>
              <customerBank>
                   <bankName>Investment Corporate Holdings</bankName>
                   <IBAN>EF00123456789</IBAN>
                   <creditCardNum>123456789012</creditCardNum>
                   <creditCardType>VISA</creditCardType>
              </customerBank>
              <vacationPref>City breaks</vacationPref>
         </customer>
         <customer customerID="asua002">
              <customerName>
                   <firstName>Mario</firstName>
                   <lastName>Ginelli</lastName>
                   <age>34</age>
              </customerName>
              <customerAddress>
                   <street>4803 Long Street</street>
                   <city>Earthfarm</city>
                   <country>Canada</country>
                   <phoneNumber>123-456-7890</phoneNumber>
                   <emailAddress>[email protected]</emailAddress>
              </customerAddress>
              <customerBank>
                   <bankName>Investment Corporate Holdings</bankName>
                   <IBAN>EF00123456789</IBAN>
                   <creditCardNum>123456789012</creditCardNum>
                   <creditCardType>VISA</creditCardType>
              </customerBank>
              <vacationPref>Kayaking</vacationPref>
         </customer>
    </customerList>
    Thanks in advance
    Amit

    Thanks for the reply.
    I was trying to understand the XPath expression axes and was trying to achieve the same by using preceding-sibling.
    After some reading I was able to get the desired result by applying the following XSLT
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html"/>
    <xsl:template match="customerList">
    <html>
    <b>
    <br>
    <xsl:apply-templates select="customer/customerAddress"/>
    </br>
    </b>
    </html>
    </xsl:template>
    <xsl:template match="customerAddress">
    <br>
    <xsl:value-of select="preceding-sibling::customerName/firstName"/>
    </br>
    </xsl:template>
    </xsl:stylesheet>
    Thanks a lot. May be it will be helpful to others.

  • Real simple xslt problem/question

    Hi, i have a real simple xslt problem but i just cant figure out how to do it by looking at various examples on the net. i have a xml document and in it are some elements with a "result" tag name. i want to use xslt to reproduce exactly the same xml document except with an attribute called "id" added to those elements with a "result" tag name. i'm sure that theres a simple solution to it but i just cant figure it out. any helps greatly appreciated, thanks

    Start with the XSLT identity transform (I don't have it handy and it's fairly long, but you should be able to google it up). Add this:<xsl:template match="result">
      <result id="">
        <xsl:apply-templates>
      </result>
    </xsl:template>

  • Java Translets XML/XSLT Transformation

    Translets "are precompiled XSL documents that are optimized and converted into simple Java classes. When you compile your application Java files, you compile your XSL files into Java class files. During runtime, you can load translets like any regular Java class and perform XSL transformations over and over again.
    The syntax checking and parsing of XSL documents are done when the XSL files are compiled. The transformation therefore takes only as long as the compiled code takes to execute, which improves performance multiple folds.
    The downside to using XSL is that "it can take a considerable amount of time and reduce performance. The time needed to parse XML and XSL documents is directly proportional to the size of the documents. Each transformation requires the XML and XSL documents to be loaded, syntax checked, and parsed." I recommends using translets for the following reasons.
    I had written an application (<a href="http://www.simplygites.com" title="www.simplygites.com">SimplyGites</a>) using standard XSL / XML transformation and experienced some very slow server-side transformation on the very complex screens with large amounts of xml. Timings showed these problem screens took 2-3 seconds to transform, which was totally unacceptable non-functional requirements.
    I considered rewriting these screens as JSP or PHP, then I discovered Translets. And wow what a discovery the timings for these pages now compiled as Translets(java classes) are amazing in comparison to the original timings ? I now have them transforming in 500ms (all now under 1 second).
    I would recommend anyone using XSL/XML transformation to use Translets, these have now been running tried and tested on the <a href="http://www.simplygites.com" title="www.simplygites.com">SimplyGites</a> for the past 6months.
    Technolgies used:
    Weblogic 8.1 SP5
    Java 1.4.2
    Required Jars
    xsltc.jar
    runtime.jar
    BCEL.jar
    JLex.jar
    java_cup.jar
    regexp.jar
    xml-dtm.jar
    For more information see http://xml.apache.org/xalan-j/xsltc_usage.html
    I hope this helps anyone that has XML/XSLT performance issues.
    Mark
    MB Computer Ltd
    www.simplygites.com

    Thanks for your help.
    The problem was that my firewall was blocking my server.

  • Turning XML/XSLT files into a working Web Template

    I've scoured these and other forums for this small piece of information, so I apologize if it's been answered already, but I can't find it.
    I understand that the web templates in Lightroom are done in XML/XSLT, with the XML file named galleryMaker.xml and the XSLT file named transformer.xslt. However, I cannot figure out how to get these files to show up as a template in Lightroom.
    I am on a Windows XP machine, and all the templates show up in Application Data/Lightroom/Web Templates, but they are all of the type *.lrtemplate. Is there a way to convert the XML/XSLT set of files into an lrtemplate file? Or is there something else I'm supposed to do?

    Splatt42 wrote:
    I have an executable binary program (that runs just fine on it's own) that I needed to turn into a service (call it "foo"). I did so using the .xml file below, and it does indeed start up at boot, runs in the background,When you run your program (/usr/bin/foo), does it daemonize itself (kind of like running /usr/sbin/sshd), or would you have to do it yourself if run from the shell ('/usr/bin/foo &')?
    and does everything it should. I've noticed a couple of problems, though. If I execute an init 0, the system hangs and never gets to the OK prompt. If I disable my service, an init 0 completes without any problems. An init 5 works OK, as does a shutdown from the desktop. I'm not sure what could be causing this. I thought maybe because the service was restarted over and over again...?
    I gave my service a timeout value of "0", as I found that when I gave it any other value the service stopped running when the timeout expired. A seeming side effect is that my service is never listed as running, as it's start method (itself) hasn't yet completed.The manifest doesn't really want your binary as the start method. It wants to run something that starts the service, and will exit with status 0 if the startup was successful, and non-zero if the startup was unsuccessful. So you might want to write a small wrapper script (like an init.d startup script).
    Take a look at the sshd.xml manifest. It doesn't start sshd, it runs '/lib/svc/method/sshd start', which is responsible for starting sshd.
    Darren

  • XSLT problems

    Hi All,
    I'm having a bit of a problem with creating a XSL file in DW.
    Basically, I can't seem to get the XML page to show anything
    when applying a
    transformation document.
    I've managed it easily enough when testing with a RSS feed
    but when I try
    exactly the same process on my example XML file it simply
    fails (no errors -
    no nothing).
    Any ideas?
    XML (no XSLT)
    http://www.webitpr.com/alexaTest/test2raw.xml
    XML (w' XSLT)
    http://www.webitpr.com/alexaTest/test2.xml
    XSLT
    http://www.webitpr.com/alexaTest/test2b.xsl
    Starting to really bug me now, so any help is much, much,
    much appreciated.
    Cheers
    Justin

    further posting 14 above...
    "Justin Reid" <[email protected]>
    wrote in message
    news:ekph8s$75s$[email protected]..
    > Hi All,
    >
    > I'm having a bit of a problem with creating a XSL file
    in DW.
    >
    > Basically, I can't seem to get the XML page to show
    anything when applying
    > a transformation document.
    > I've managed it easily enough when testing with a RSS
    feed but when I try
    > exactly the same process on my example XML file it
    simply fails (no
    > errors - no nothing).
    >
    > Any ideas?
    >
    > XML (no XSLT)
    http://www.webitpr.com/alexaTest/test2raw.xml
    > XML (w' XSLT)
    http://www.webitpr.com/alexaTest/test2.xml
    > XSLT
    http://www.webitpr.com/alexaTest/test2b.xsl
    >
    > Starting to really bug me now, so any help is much,
    much, much
    > appreciated.
    >
    > Cheers
    >
    > Justin
    >
    >

  • WIJ 20002 xml Parser Problem - Rich Client

    Hi,
    I have a problem with the rich client on a new installation:
    Business Objects Enterprise XI 3.1 SP3 on Windows 2008 Standard.
    If I connect with the rich client "import document"is disabled.
    if I try to create a new document from the rich client it returns the error below (I used the rich client on two workstations):
    WIJ 20002
    Version: null
    Analisi dello stack:
    java.lang.RuntimeException: java.lang.RuntimeException: XML parser problem:
    XMLJaxpParser.parse(): Element type "ABOUT_Patentnumbers" must be followed by either attribute specification, ">" or "/>".
    at com.businessobjects.wp.xml.jaxp.XMLJaxpParser.parse (Unknown Source)
    at.com.businessobjects.webi.richclient.XMLviaOccaRC.getServerConfiguration (Unknown Source)
    Have you any solution?

    The fixpack 3.5 client resolves the problem.

  • HELP: JSP + XML + XSLT = HTML?

    Hello, all.
    I am trying out Weblogic 6 and I am trying to get the JSP + XML + XSLT =>
    HTML chain working.
    I am coming from using Orion and SAXON.. and in that situation I had a JSP
    that contained XML tags... they were filled in at runtime and then using
    Servlet-Chaining was passed along to the SAXON XSLT Processer. SAXON checked
    for the inline XSL specified and then used that to transform the document
    into HTML.
    It worked well, but there were some other features missing/not documented
    that we now need.
    With Weblogic I am trying to use the XSLT Tag Library that comes with the
    distribution, but it seems to be very finicky. I followed the directions and
    I got it to do a sort of roundabout transformation. But it doesn't seem to
    work quite right.
    The best I can get is the following:
    I have an 'xslt' directory url-pattern-mapped to xslt.jsp (as instructed)...
    but can't figure out how to specify the xsl file on-the-fly... that is, if I
    don't hard-code the XSL file in the x:xslt element in the xslt.jsp it
    complains about some XML file not having a root element.
    Ideal situation:
    1. I have a JSP that includes XML elements.
    2. It is filled from a database at runtime and specifys (using a PI) what
    XSL stylesheet it is to be processed with.
    3. Somehow (fingers crossed) the XML is processed and transformed into HTML
    by the appropriate XSL file.
    I think I am mostly stuck moving between steps 2 and 3.
    Can anyone give me some hints? Are there some Weblogic specific
    elements/tags that I have to include in the XML file that Weblogic will
    catch and re-direct to the XSL Parser?
    Please, anyone, if you have some information, I would much appreciate it.
    Dylan Parker
    PS - I apologize for the cross-post, I hope it doesn't cause too much
    traffic.

    Craig,
    I've since discovered how to do it with the WL Taglibrary... and have
    moved on =)
    It has to do with the EXTREMELY BADLY documented x:xml tag that can
    appear within the x:xslt tag body...
    So the WL Tag Library allows something like the following.
    (Please note, angled brackets are omitted in this post to prevent html
    parsing)
    [x:xslt stylesheet="sheet.xsl"]
    [x:xml]
    Here is the XML to run the sheet on.
    This should have all relevant XML syntax: the PIs, the doctype,
    root elements etc...
    [x:xml]
    [x:xslt]
    And that DOES work. But not very well. WL, a little prematurely
    incorporated versions 1.2 of Xerces and Xalan in their product -- and
    these versions have some irritating bugs.
    Also -- There tag library doesn't copy the source XML across as UTF-8
    .. so a lot of the Japanese I have embedded there (from a DB) gets
    mangled somewhere in their code...
    AND -- If you hammer a little bit on an JSP/XML that uses the WL Tag
    Library (eg clicking refresh lots of times in IE)... I get huge
    amounts of irritating exceptions appearing in the log files.
    NullPointerExceptions
    XSL Parsing Exceptions
    XML Parsing Exceptions
    but completely unpredictably...
    In my eyes.. the WL XML/XSL Tag Library using the incorporated and
    untouchable Xalan and Xerces (v1.2) is virtually unusable.
    What a pain.
    BUT! Apache offers a similar OPEN SOURCE XSL Tag Library available
    here:
    http://jakarta.apache.org/taglibs/doc/xsl-doc/intro.html
    And it uses the standard, non-weblogic-incorporated, Xerces and Xalan
    (which means you can provide whatever version you want).. and it works
    impressively well.
    It has almost identical performance as the WL Taglib, and without all
    of the bizarre exceptions being thrown.
    And it does proper passing of the character encoding type!
    If only the taglib did caching though =(
    The performance hit over pure JSP is huge. Almost two orders of
    magnitude. On my desktop box I can get around 500Requests/Sec if I am
    returning HTML direct from a JSP... while if I produce XML that gets
    processed by XSL into HTML the Requests/Sec drops to 5!!!!
    Caching. Caching. And more Caching. A lot of DiskIO is going on with
    the XML/XSL/XHTML chain of events.
    I hope this helps!
    I'd be curious as to what you find out as well.
    Dylan Parker
    On 5 Mar 2001 07:20:00 -0800, "Craig Macha"
    <[email protected]> wrote:
    >
    Yep, I feel Dylan's pain.
    I am trying to accomplish the same thing. A JSP page generating
    dynamic XML content and then utilizing an XSLT stylesheet to transform
    all the content into XHTML.
    Does anyone have some examples that show exactly how to accomplish
    this? Can I do this with WLS and the XML taglib that comes with
    it? Or do I have to move on to something like Cocoon to get this
    capability?
    Any insight would be greatly appreciated.
    Thanks,
    Craig Macha
    "Dylan Parker" <[email protected]> wrote:
    Hello, all.
    I am trying out Weblogic 6 and I am trying to get the
    JSP + XML + XSLT =>
    HTML chain working.
    I am coming from using Orion and SAXON.. and in that situation
    I had a JSP
    that contained XML tags... they were filled in at runtime
    and then using
    Servlet-Chaining was passed along to the SAXON XSLT Processer.
    SAXON checked
    for the inline XSL specified and then used that to transform
    the document
    into HTML.
    It worked well, but there were some other features missing/not
    documented
    that we now need.
    With Weblogic I am trying to use the XSLT Tag Library
    that comes with the
    distribution, but it seems to be very finicky. I followed
    the directions and
    I got it to do a sort of roundabout transformation. But
    it doesn't seem to
    work quite right.
    The best I can get is the following:
    I have an 'xslt' directory url-pattern-mapped to xslt.jsp
    (as instructed)...
    but can't figure out how to specify the xsl file on-the-fly...
    that is, if I
    don't hard-code the XSL file in the x:xslt element in
    the xslt.jsp it
    complains about some XML file not having a root element.
    Ideal situation:
    1. I have a JSP that includes XML elements.
    2. It is filled from a database at runtime and specifys
    (using a PI) what
    XSL stylesheet it is to be processed with.
    3. Somehow (fingers crossed) the XML is processed and
    transformed into HTML
    by the appropriate XSL file.
    I think I am mostly stuck moving between steps 2 and 3.
    Can anyone give me some hints? Are there some Weblogic
    specific
    elements/tags that I have to include in the XML file that
    Weblogic will
    catch and re-direct to the XSL Parser?
    Please, anyone, if you have some information, I would
    much appreciate it.
    Dylan Parker
    PS - I apologize for the cross-post, I hope it doesn't
    cause too much
    traffic.

  • XML - ExportDocument problem

    I'm exporting a xml document that I'm creating dynamically in my application.
    I'm having the following problems (working with 30M.2).
    1)
    It's not possible to edit a DTD (or creating one run time) so I have to write a
    template doc XML to have it.
    I'm afraid that this is a costraint on the DOM1 so ...
    2)
    Once I complete the construction of the doc, I need to write it down (let's say
    on a file, but could be also in memory to send it on http).
    When I write it (using exportdocument function) I just find the root element
    with all it's children, no haeder (<?xml version="1.0" ?><!DOCUMENT ...>) so I
    cannot have the dtd information on the stream, and cannot enforce validation of
    the doc when someone read it afterwards.
    I admit I'm new of the subject, but or I miss something or something is wrong:
    having trouble to get a dtd and not being able to code it's information.
    Anyone has some ideas?
    TIA
    Luca

    I'm interested in DTDs. For example in the reported situation, why, if you
    know you've created a valid XML document would you want to give a DTD to
    someone at the other end? If someone has a DTD at the other end and want to
    use it to validate your XML then fine but if you create the XML and are
    controlling the format then wouldn't they just assume the XML correct if the
    DTD wasn't being controlled by a 3rd party or themselves?
    DTDs don't help you create a document but just validate it, I'd thought. If
    there is more to DTDs I'd appreciate if someone felt like ellaborating.
    Thanks.
    Matthew Middleton
    OrYx Software Consultant
    Lawpoint Pty. Limited
    A Solution 6 Company
    Ph: +61 2 9239 4972
    Fax: +61 2 9239 4900
    E-mail matthewmwriteme.com
    ----- Original Message -----
    From: Luca Gioppo <Luca.GioppoCSI.IT>
    To: <forte-userslists.xpedior.com>
    Sent: Tuesday, August 08, 2000 8:24 PM
    Subject: (forte-users) XML - ExportDocument problem
    >
    >
    I'm exporting a xml document that I'm creating dynamically in myapplication.
    I'm having the following problems (working with 30M.2).
    1)
    It's not possible to edit a DTD (or creating one run time) so I have towrite a
    template doc XML to have it.
    I'm afraid that this is a costraint on the DOM1 so ...
    2)
    Once I complete the construction of the doc, I need to write it down(let's say
    on a file, but could be also in memory to send it on http).
    When I write it (using exportdocument function) I just find the rootelement
    with all it's children, no haeder (<?xml version="1.0" ?><!DOCUMENT ...>)so I
    cannot have the dtd information on the stream, and cannot enforcevalidation of
    the doc when someone read it afterwards.
    I admit I'm new of the subject, but or I miss something or something iswrong:
    having trouble to get a dtd and not being able to code it's information.
    Anyone has some ideas?
    TIA
    Luca
    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

  • XML/XSLT Newbie

    Hi All
    I'm want to dip my toe into the world of XML/XSLT development
    to help with
    job applications. Seems there's a lot of companies asking for
    this.
    I've been developing ASP applications for a number of years,
    but i've never
    looked at XML, etc...
    Can anyone provide a strating point, examples, etc? I'm also
    looking to
    learn .NET too (think i have a mountain to climb).
    I've been using Access database for my applications but also
    need to expand
    by using MS SQL on my local machine.
    Any ideas wher to start?
    Hope someone can point me in the right direction - Thanks in
    Adance
    Andy

    > Can anyone provide a strating point, examples, etc? I'm
    also looking to
    > learn .NET too (think i have a mountain to climb).
    And at the top of that mountain is a pile of .net XML
    applications. I can't
    say that's the motherland of software development, but, yea,
    it probably
    pays good. ;o)
    > Any ideas wher to start?
    Well, if you start using asp.net 2.0, a lot of the built-in
    controls
    leverage XML and XSLT, so you'll begin to get your hand dirty
    just going
    through the basic ASP.net 2.0 tutorials.
    -Darrel

  • JSP   vs.    XML/XSLT

    Hi all!
    I'm in a bit of a dilema. As the least knowledgable member of our small development group (3 people incl. me) I'm caught in the middle of a pretty fierce debate over whether or not to we should implement JSP.
    Currently to seperate business logic from presentation we have our servlets pass XML to the browser and then the browser renders the HTML using the appropriate .xsl (sometimes we use server-side transformation).
    Now one of the guys wants to use MVC/Struts and JSPs in order to create a much needed UI for an application. The plan is to not put any Java code in the JSP (seperation of logic and presentation - good, business logic in both the JSP and Servlet - bad.) but the other guy is still vehemently against it.
    He says that anything JSP can do we can already do with XML/XSLT and to add JSP to our environment would complicate things.
    And while I agree with him there, there are some things that when you do them with JSPs make the code more readable and transparent.
    If you had to take a side, which one would you choose?
    Has anyone else out there already gone through this debate? I'd be interested in knowing the outcome.
    Thanks,
    John

    I have a couple of comments.
    1> "XML to the browser and then the browser renders the HTML using the appropriate .xsl"
    I all cases you should do the transformations on the server. Lot of browser do not know how to
    do a xsl transform. And since you can do it some time why not do it not everytime?
    2> "business logic in both the JSP and Servlet"
    Business logic should neither be in servlets nor in jsp. I think they should be in business logic beans.
    3> "anything JSP can do we can already do with XML/XSLT "
    Although anything can be done using xml/xsl or jsp there are a bit of differences where struts-jsp architecture is more perferable.
    Imaging a web site which has lots of online forms(with textfiedls, checkboxes, select lists, etc) which are to be validated and if some validation fails the same form is to be shown with the values already submitted prefilled. Doing this with xml/xsl or even simple jsp could be a nightmare.
    But if you use struts MVC architecture with jsp and struts taglib this will be very very simple.
    Introducing struts-jsp will not complicate things and if the scnario described above is there or could arise in your application then you should seriously think about using struts+jsp. That does not mean you will have to scrap you xml+xsl architecture. You can still generate the xml using your action bean , put the xml in request and forward it to you jsp for rendetion. The jsp page could then use a taglib which has the xsl transformation code to do the xslt transformation.
    The above comments are not just my thoughts but i have also implemented/experienced the above during various projects and they have proved to be useful.
    Cheers!

  • Txt to xml. Problems with characters(&, , ',...)

    I want to generate a xml file with text from a txt file but i have problems with special characters such as &, <... I'd like to know if there�s any class or library to filter the text in order to generate my xml without problems.
    Thank you.

    Use JDOM to generate your XML. It will worry about escaping issues for you.
    Here's a (probably rather inelegant) example for you to play around with:
    import javax.xml.parsers.*;
    import javax.xml.transform.*;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.*;
    public class DateBoom {
         public static void main(String[] args)
              throws Exception
              DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
              DocumentBuilder builder = factory.newDocumentBuilder();
              String dodgyText = "< & '";
              Document document = builder.newDocument();
              Element root = document.createElement("root");
              root.setAttribute("dodgy",dodgyText);
              document.appendChild(root);
              Element child = document.createElement("child");
              root.appendChild(child);
              child.appendChild(document.createTextNode(dodgyText));
              Transformer transform = TransformerFactory.newInstance().newTransformer();          
              Source source = new DOMSource(document);
              Result result = new StreamResult(System.out);
              transform.transform(source,result);
    }Your alternative is to use something like String regular expressions (regex) to do this manually, but the XML oriented libraries will catch more corner cases than you're likely to anticipate, making them more reliable.

  • OT:XML/XSLT transformations on iAS6.0 anyone?

    Hi,
    I know this is Off Topic from JATO, but...
    I am trying to come up with a way to process the typical
    transformation of xml & xslt to html.
    For whatever reason I can't seem to get this to work.
    I've tried it by writing my own servlet, but it hangs.
    I've tried to install cocoon, but nothing ever works, and all the
    installation instructions seem to trail off at the most important time
    (like what if the build doesn't create a war file).
    Can someone point to a definitive resource that I can follow for
    something like this which will work on iAS6.0?
    Thanks,
    John Hoskins.

    Yeah, off topic, so I doubt you will get any expert help here. Might try the S1AS 6.x forum.
    sorry

  • On XML, XSLT, FO usage

    Hi,
    Any links... help...documents... tutorials... samples on usage of XML, XSLT, FO engine, for pdf generation.
    Ravishankar Swamy

    Hi,
    This Technical Note is very interesting to start point
    http://www.oracle.com/technology/pub/notes/technote_vohra_fop.html
    Follow good references from AMIS
    http://technology.amis.nl/blog/?p=1102
    http://technology.amis.nl/blog/?p=1182
    Best regards

  • Job Opening:  DITA -  XML - XSLT  at Mentor Graphics

    Mentor Graphics has the following open postion:
    Title: Technical Publications Infrastructure Engineer (XML - XSLT - DITA)
    Position based: Wilsonville, Oregon
    Please follow the link to the job description: http://ch.tbe.taleo.net/CH08/ats/careers/requisition.jsp?org=MENTOR&cws=1&rid=1023

    I would have applied myself, but unfortunatley someone made it so you can see other people's post history.

Maybe you are looking for

  • IPod crashes when I click in certain artist

    I posted this in the 3g forum but I guess this one is more suitable, so if a mod would like to delete the other one that would be great. Ok, this has never happened before and my phone is new. Not even a month old. Anyways, I synced some new music on

  • Any ideas if you've broken the glass on your screen. The picture is still fine.

    Any ideas if you have broken the glass screen on your iPod 4, picture is fine but glass shattered.

  • Export as jpg problem

    I have some serif type from which I've created outlines. I'm saving this doc as a pdf and also exporting it as a jpg so others can place it in different types of documents. I want to make a second version of the graphic by reversing the type onto a d

  • Apache 2.2.17-2 Segmentation Fault

    Hi, I just upgraded apache to the 2.2.17-2 version and now all my php/mysql pages that have a login ($_SESSION) crash the server (apache child segfaults): [Tue May 10 12:50:54 2011] [notice] child pid 11446 exit signal Segmentation fault (11) Anyone

  • Firefox 7 trys to restore tabs but crashes every time

    If the computer shuts down with FF 7 running, when you try to reopen it after restarting computer it just locks up showing program not responding. Then when you try to reopen again it shows the screen to start new or restore session. It does it every