Can I really use XML/XSL to achieve this HTML?

Hi Folks,
I want to convert the following XML:
<foo name="aa" id="a">Name of person</foo>
to the following HTML:
<input type="text" name="a" size="30" value="aa">
I've tried several alternatives but with no success. Please help.
null

Try this out
<xsl:element name="input">
<xsl:attribute name="type" select="'text'"/>
<xsl:attribute name="name" select="/foo/@id"/>
<xsl:attribute name="size" select="'30'"
<xsl:attribute name="value" select="/foo/@name"/>
</xsl:element>
Only doubt I have is on the attribute id .
null

Similar Messages

  • My mother never opened/registered her AppleCare she bought 1 year ago. I was told I can't use her AppleCare for my 4s I got this month because a newer version has been released, she can't even use it herself. Is this true? Can she get a refund?

    My mother never opened/registered her AppleCare she bought 1 year ago. I was told I can't use her AppleCare for my 4s I got this month because a newer version has been released, she can't even use it herself. Is this true? Can she get a refund?

    Only one way to find out: call AppleCare.

  • Why can't i use my pdf converter on this computer?

    why can't i use my pdf converter on this computer?

    Very hard to guess. What happens when you try, exactly? (Exactly includes all error messages in full, please).

  • Can't i use xml schema and oledb data connection at the same time?

    Hello to all and thanks in advance.I use xml schema and oledb data connection at the same time and the problem is that when I try to export the xml, the outcome is not what i expect.Without the oledb connection everything is ok (just the schema) and the xml complies with the schema.
    Can't i have both schema and oledb and the exported xml be as i want it?

    You can use both at the same time, but not gor Internet access if that's what you're asking.
    Now there is a thing called Link Aggregation, which combines a number of interfaces for speed/redundancy, but it really only works locally, and then only with ALL special equipment in the route, and most likely OSX Server involved.
    Sorry.

  • Large Pdf using XML XSL - Out of Memory Error

    Hi Friends.
    I am trying to generate a PDF from XML, XSL and FO in java. It works fine if the PDF to be generated is small.
    But if the PDF to be generated is big, then it throws "Out of Memory" error. Can some one please give me some pointers about the possible reasons for this errors. Thanks for your help.
    RM
    Code:
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import org.xml.sax.InputSource;
    import org.xml.sax.XMLReader;
    import org.apache.fop.apps.Driver;
    import org.apache.fop.apps.Version;
    import org.apache.fop.apps.XSLTInputHandler;
    import org.apache.fop.messaging.MessageHandler;
    import org.apache.avalon.framework.logger.ConsoleLogger;
    import org.apache.avalon.framework.logger.Logger;
    public class PdfServlet extends HttpServlet {
    public static final String FO_REQUEST_PARAM = "fo";
    public static final String XML_REQUEST_PARAM = "xml";
    public static final String XSL_REQUEST_PARAM = "xsl";
    Logger log = null;
         Com_BUtil myBu = new Com_BUtil();
    public void doGet(HttpServletRequest request,
    HttpServletResponse response) throws ServletException {
    if(log == null) {
         log = new ConsoleLogger(ConsoleLogger.LEVEL_WARN);
         MessageHandler.setScreenLogger(log);
    try {
    String foParam = request.getParameter(FO_REQUEST_PARAM);
    String xmlParam = myBu.getConfigVal("filePath") +"/"+request.getParameter(XML_REQUEST_PARAM);
    String xslParam = myBu.SERVERROOT + "/jsp/servlet/"+request.getParameter(XSL_REQUEST_PARAM)+".xsl";
         if((xmlParam != null) && (xslParam != null)) {
    XSLTInputHandler input = new XSLTInputHandler(new File(xmlParam), new File(xslParam));
    renderXML(input, response);
    } else {
    PrintWriter out = response.getWriter();
    out.println("<html><head><title>Error</title></head>\n"+
    "<body><h1>PdfServlet Error</h1><h3>No 'fo' "+
    "request param given.</body></html>");
    } catch (ServletException ex) {
    throw ex;
    catch (Exception ex) {
    throw new ServletException(ex);
    public void renderXML(XSLTInputHandler input,
    HttpServletResponse response) throws ServletException {
    try {
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    response.setContentType("application/pdf");
    Driver driver = new Driver();
    driver.setLogger(log);
    driver.setRenderer(Driver.RENDER_PDF);
    driver.setOutputStream(out);
    driver.render(input.getParser(), input.getInputSource());
    byte[] content = out.toByteArray();
    response.setContentLength(content.length);
    response.getOutputStream().write(content);
    response.getOutputStream().flush();
    } catch (Exception ex) {
    throw new ServletException(ex);
    * creates a SAX parser, using the value of org.xml.sax.parser
    * defaulting to org.apache.xerces.parsers.SAXParser
    * @return the created SAX parser
    static XMLReader createParser() throws ServletException {
    String parserClassName = System.getProperty("org.xml.sax.parser");
    if (parserClassName == null) {
    parserClassName = "org.apache.xerces.parsers.SAXParser";
    try {
    return (XMLReader) Class.forName(
    parserClassName).newInstance();
    } catch (Exception e) {
    throw new ServletException(e);

    Hi,
    I did try that initially. After executing the command I get this message.
    C:\>java -Xms128M -Xmx256M
    Usage: java [-options] class [args...]
    (to execute a class)
    or java -jar [-options] jarfile [args...]
    (to execute a jar file)
    where options include:
    -cp -classpath <directories and zip/jar files separated by ;>
    set search path for application classes and resources
    -D<name>=<value>
    set a system property
    -verbose[:class|gc|jni]
    enable verbose output
    -version print product version and exit
    -showversion print product version and continue
    -? -help print this help message
    -X print help on non-standard options
    Thanks for your help.
    RM

  • How can (parse) i use XML file with missing EndTag

    hi,
    i have an application which writes an "XML file".
    another application should read that XML file, build an DOM and
    access the nodes with xpath.
    my problem. if the first application is not finished there are tags
    missing. e.g. </xml>. but the seconds application cannot wait until the first application finishes it task.
    if i now read the XML file the parser cannot load it because the end tags are missing.
    my question:
    how can i deactivate the check or how can i read the XML file and access it via XPath (my application is using at the moment XPath to access the nodes and i dont want to change that)
    as parser i am using XERCES
    alex

    As far as I know, you can't do this - xml must be well formed (this is sort of a bedrock of xml). There may be some work around's, but I'm not aware of any - and they would most likely be hacks.

  • How can I to use XML Catalog for OSM 7.0.3?

    I have a xquery that execute a business rules in view.When I put it inside Data Instance Behavior, tab Data, inline, and
    XQUERY the deploy in OSM doesn't work because it is a large xquery, more than 4000 characters.
    So, I saw in OSM 7.0.3 doc (Developer’s Guide,Release 7.0.3 - Using XML Catalogs in OSM) that there is a possibility
    of import resources files (xquery file in my case) in OSM Data Instance Behavior through XML Catalog.
    I executed the follow steps
    1) Add entry
    *<rewriteURI uriStartString="http://br.com.ctbc" rewritePrefix="osmmodel:///XQuery/1.0.0/resources"/>*
    to my catalog.xml, which is in path <My_Cartridge>/xmlCatalogs/core/catalog.xml
    2) Set XML_CATALOG_SUPPORT variable in Design Studio with "enable"
    3)Add *<oms-parameter>*
    *<oms-parameter-name>oracle.communications.ordermanagement.util.net.CatalogUriResolver.DefaultXmlCatalogsUris</oms-parameter-name>*
    *<oms-parameter-value>file://<My_domin>/XQuery/catalog.xqy</oms-parameter-value>*
    *</oms-parameter>* to oms-config.xml, after unpack osm.ear
    4) Created a Data Instance Behavior, inline and type XQuery whith source
    declare namespace ctbcoms = "http://br.com.ctbc";
    let $result := ctbcoms:retorna()
    *return <DadosOrdem><Fim>{$result}</Fim></DadosOrdem>*
    The XQuery that has the method retorna() has name: catalog.xqy. Code:
    module namespace ctbcoms = "http://br.com.ctbc.xquery";
    declare function ctbcoms:retorna()
    let $retorno := 'teste'
    return $retorno
    So, when I deployed my cartridge I get the mensage:
    Error on line 2
    XPST0017: Cannot find a matching 0-argument function named {http://br.com.ctbc}retorna()
    <11-Jan-2012 6:40:47,906 VET PM> <WARN> <impl.e> <ExecuteThread: '14' for queue:
    'oms.xml'> <failed to compile xquery expression for xqueryInstanceType: xquery[
    declare namespace ctbcoms = "http://br.com.ctbc";
    let $result := ctbcoms:retorna()
    return <DadosOrdem><Fim>{$result}</Fim></DadosOrdem>
    ]>
    ; Line#: 2; Column#: -1
    net.sf.saxon.trans.XPathException: Cannot find a matching 0-argument function named {http://br.com.ctbc}retorna()
    I am using Design Studio 3.1.3 with OSM 7.0.3.
    Could have I a example these procedure? thank you !!!

    Two observations:
    1) Your inline xquery expression need to use the "import" xquery module expression. see point a) in my example below.
    2) the change in oms-config.xml is to support the case for overriding the cartridge xml catalog ( for example developer, qa tester, etc) so this step is not mandatory to get your cartridge working.
    =============================
    For example, In OSM Order To Activate Cartridges 703, the OrderLifeCycle, Amending State/Submit Amendment Transition has the following inline xquery which delegates xquery implementation details to a PoinOfNoReturn.xqy xquery module
    a) Inline Expression in Design Studio Entity
    CommunicationsSalesOrderFulfillmentPIP\Orders\POLICY\CommunicationsSalesOrderLifeCyclePolicy
    import module namespace pipponrfn = "http://xmlns.oracle.com/communications/ordermanagement/pip/ponr" at "http://xmlns.oracle.com/communications/ordermanagement/pip/ponr/PointOfNoReturn.xqy";
    let $taskData := fn:root(.)/GetOrder.Response
    let $checkPointOfNoReturn := pipponrfn:checkPointOfNoReturn($taskData)
    if ($checkPointOfNoReturn ..........
    b) xquery module
    module namespace pipponrfn = "http://xmlns.oracle.com/communications/ordermanagement/pip/ponr";
    declare function pipponrfn:checkPointOfNoReturn($taskData as element()) as xs:boolean { ....};
    c) cartridge xml catalog
    CommunicationsSalesOrderFulfillmentPIP\xmlCatalogs\core\catalog.xml
    <rewriteURI uriStartString="http://xmlns.oracle.com/communications/ordermanagement/pip/ponr" rewritePrefix="osmmodel:///CommunicationsSalesOrderFulfillmentPIP/1.0.0/resources"/>
    =======================
    Optinally if you have OSM 703.3 path you can use <oms-parameter><oms-parameter-name> in oms-config.xml if you need to OVERRIDE the cartridge xml catalog.
    d) osm-config.xml
    <oms-parameter>
    <oms-parameter-name>oracle.communications.ordermanagement.util.net.CatalogUriResolver.DefaultXmlCatalogsUris</oms-parameter-name>
    <oms-parameter-value>file:///<My_test_folder>/XQuery/catalog.xqy</oms-parameter-value>
    </oms-parameter>
    e) your developer xml catalog overrideing the cartridge catalog:
    your_full_path_to_xml_catalog.xml
    <rewriteURI uriStartString="http://xmlns.oracle.com/communications/ordermanagement/pip/ponr" rewritePrefix="file:///d:/your_full_path_to_test_folder"/>

  • How can I process an xml/xsl file pair that require the Internet Explorer dom?

    My personal navigation device (GPS) generates xml files that contain a record of where I have been, together with when I was there, how fast I was driving at the time, etc. taken at approx. 5 second intervals. This xml file has an xml-stylesheet with type="text/xsl" but that stylesheet is written to the Internet Explorer dom standard. The stylesheet interfaces with google maps to display a map that shows my path and it also displays tables of data including distances that are computed from latitude/longitude pairs. I can supply a small sample xml file and the xsl file as well if they are needed to diagnose my problem. I cannot find any browser other than Internet Explorer that handles these files satisfactorily. I prefer to process them from a Linux environment but with the Internet Explorer requirement I cannot do so. The browsers that I have tried and that have failed are Firefox, Opera, Konqueror, Chrome, Epiphany, Midori, Arora, and Links.
    One line in the xls file in particular gives grief in the browsers like Firefox that at least attempt to do more than display the raw xml file:
    xmlns:cymath="urn:smiletime-cybarber-net:math"
    A comment in the xls file says this about the problem:
    "Tested and currently only compatible with Internet Explorer version 6 or version 7 (as this script includes JScript functions called by XSL, msxsl:script extension is required; also, the produced XHTML document embeds javascript functions exploiting the IE DOM).
    "In order to provide compatibility with Firefox, other than checking the compatibility of the IE DOM, the cymath:distCosineLaw function still needs to be ported."

    You may get an answer, but it is not really the sort of subject covered by this forum, I suggest you try [http://forums.mozillazine.org/viewforum.php?f=49 Mozilazine] and if you solve the problem post back again.

  • Timecapsule that i can't really use? Help!

    Hi,
    Got a timecapsule recently. Got local network going. 1. Feel it slow down everything? could this be true? 2. Must i connect timecapsule to my modem? Can i connect a direct ADSL connection to it? 3. My iPad2, iPhone & Apple TV (gen1) can't sync with timecapsule (I only synced my laptop)! I access the net through it, but can't import/ export anything! Is there an airport utility for iPad2, iPhone? What to do with the Apple TV? How can I store all movies in my 2TB of space? Thanks, appreciate the help.

    2. Clear, a modem must be connected, I can still see the 'old' network from my wireless modem, should I disable this? Can I disable this? Would that potentially speed up connection (if indeed it has slowed down)?
    So, your existing modem is actually a combination modem & wireless router ... correct? Some of the affect to network performance you are seeing may be related to Wi-Fi interference between this device and the TC. I would recommend disabling this device's wireless to see if you get an immediate improvement.
    3. Wanted to sync the devices with TC so I can share files easily amongst all local network, music, photos, videos, what use is the TC othewise, is it only to back up desk/ lap-tops and create a local netwrok?
    iTunes does offer Home Sharing as an option. The TC was primarily designed to be used with Time Machine for backups. It also has been designed to perform as a basic NAS device, Print Server, and File Server.
    4. How can I use TC as a Media Storage device? 5. Apple TV (gen1) and actually my second laptop cant see the TC? Thanks again.
    Please check out this AppleBlog article.

  • Can Final Cut, use XML to cut a movie file?

    I am looking into how to cut a movie file with a XML file that has in and out points in seconds.
    Is this possible to do if not, what program can?

    FCP can read a properly formatted XML file and produce a sequence, but FCP is a non-destructive editor, so the original movie will simply be referenced, not actually altered by FCP's interpreting of the XML.
    I must admit, with the dearth of information in your query, that response is a total shot in the dark. If you could elaborate, you might get a better answer.
    Patrick

  • Can you really use EverWet waterproofing spray with iPhone & laptops?

    Does anyone know if you can safely use the new "EverWet" spray to waterproof an iPhone, laptop, etc.? (http://www.neverwet.com/)
    Demo videos show an iPhone treated w/ this spray, fully functional while submerged in water—but how is this possible, without destroying the ports, and/or overheating the device? See one demo here: http://bit.ly/15eBufn
    EverWet is now sold in Home Depots as of 2012 - but considering the incredible application possibilities, I'm curious why I haven't heard more about it—and how it wuold be possible to use w/ a laptop, without destroying the ports / functionality.
    Can anyone help with this?

    its NOT possible, Im familiar with that nanotechnology hydrophobic spray,..its good for boots, gloves, and exterior coatings on NON electronic devices.  There is nothing on earth that is going to protect your AIR computer from water, especially submerged, (except maybe a giant industrial ziplock as used by the Army to protect electronics in the field)
    if such spray made it to the micro resistors etc etc in the logic board and bridged an electrical gap even with the machine OFF (much less on), it would fry your computer.
    MACS already have non porous metal casings, and NOTHING on earth is going to protect a LOT of water seeping thru the keyboard slots onto the motherboard,....NOTHING.
    Dont even think of using that stuff on your iphone or laptop

  • Can you really use Display String formula to test for NULL

    I am trying to manipulate the Display String of a field throught the Format Editor.  If a field is null, it should display "N/A", or "No data given", or anything else appropriate I might choose.
    I can't get this feature to work and I'm wondering if there's a bug here.  I'm using the following formula:
    if (isnull() or    trim() = "")
    then "N/A"
        else
    Am I doing something wrong or is there a better way to do this?

    Hi Adriane
    The other way to display "N/A", or "No data given" if a field is null is using a formula with if -else statement as follows:
    whileprinting records;
    if (isnull() or trim () =" ")
    then "N/A"
    else
    Please let me know if this helps.
    Thanks
    Poonam Thorat

  • Can I really use iCloud to easily transfer and synch Mac and PC files on several devices - including my iPad and PCs?

    Hello Everyone
    I am a novice iPad User because of 2 reasons, which are the only reasons I use my PCs at all!! The first reason is because of the great difficulty, almost impossibility, I have in getting files (Mac and PC - Msoft/Lotus) to tranfer and synch via the internet between my iPad and home & work laptop. Without going into too much detail will iCloud (and iTunes) solve this file transfer and synch problem?
    Secondly I have some e-mail issues when using different ISPs, but this question can wait until the other (above) has been solved - if this is possible.
    If there is anyone who can advise me on iCloud/iTunes I would be most grateful.
    Thanks
    M

    tejash.m wrote:
    Would you mind explaining the "facts"?
    "news" from apple website
    http://www.apple.com/iwork/iwork-dot-com/?cid=APP-NAUS-IWORK-090702-00004&cp=APP -IWORK-00004&sr=IWORK.COM
    Looking for iWork.com public beta?
    With a new way to share iWork documents between your devices using iCloud, the iWork.com public beta service will no longer be available. As of July 31, 2012, you will no longer be able to access your documents on the iWork.com site or view them on the web.
    We recommend that you sign in to iWork.com before July 31, 2012, and download all your documents to your computer. For detailed instructions on how to save a copy of your documents on your computer, read this support article at Apple.com.
    Learn more about iCloud
    Sign in to iWork.com
    Try doing some reading for yourself, iWork is not going away, it is iWork.com that is going away and it is being replaced by iCloud.
    tejash.m wrote:
    Could you explain how to
    A. Save a document using, say, numbers, on Dropbox instead of iCloud?
    You can't do that, but that isn't any different from any other type of document (with the exception of photos) with dropbox on an iOS device, that's a limitation of the dropbox app, not of iCloud.That's not the same as iWork not working with dropbox which is what you stated originally.
    tejash.m wrote:
    Could you explain how to
    B. access this document for editing via a pc? Remember the outlook add in does not have the documents option. You can only sync emails, contacts, bookmarks (if you've installed safari), calendar and photo stream.
    Download it from iCloud.com and start editing it.
    If you expect others to do your thinking for you, please stop making absurd statements and try asking pleasantly like everyone else.

  • HT204053 Why can't I use my magic jack on this device ?

    I need to use my magic jack account on this device but I can't !

    You should look in MagicJack's Help pages - see if this one helps you:
    http://magicjack.com/faq/ and type 'ipad' in the Search field.

  • Can't uncheck "use default alerts only on this computer" 10.8

    Hi,
    I am using up to date Mountain Lion up to date and also OSX server.
    I am using the calendar linked to my gmail account.
    However, under Preferences | Alerts the checkbox is greyed out and I can not uncheck it.
    Is there anyway to correct this?

    If you are only receiving alerts on your desktop, but not your other devices (for you gmail account), you need to go to the other devices and turn on alerts.  It may appear that alerts are turned on, but they may not be.
    Example on phone
    Settings< Mail Contacts Calendars
    Scroll down all the way to the end and click on "Defaut Alert Times". I set mine for 15 min.
    Now it works and syncs with both devices. 
    I hope this helps~!

Maybe you are looking for

  • How to add a new field in predefined report output

    HI,   how  to and where to  search for the filling of "fieldcat table" in the  predefined ALV report. So that i can add a new field in the output of a predefined report

  • Browser compatibility issues with different versions of IE

    I'm looking for an online resource or book on identifying/troubleshooting JSP browser compatiblility issues focusing on recent versions of IE (5.0 - 6.0). Any sugguestions?

  • Feedback deferred constraint is incorrect in sql developer 2.1.0.63.41

    In the earlier 2.1.0.63 the set contraint didnt work entirely in sql developer. In this new release the set constraint can be executed and it works, however when you violate a constraint there is no feed back. example: I create the following table an

  • Custom login module with 10.1.3

    Hello all, I've been trying out Frank N's custom login module (http://www.oracle.com/technology/products/jdev/howtos/10g/jaassec/index.htm) with JDev 10.1.3/OC4J 10.1.3 and am not having much luck. Whenever I add <property name="role.mapping.dynamic"

  • Varying velocity in midi notes

    you can make the garageband drums sound a lot more real when you vary the velocity of each note a little, but is there a way to somehow select them all and vary them by a few numbers each? if not they should definitely add a feature like that