Oracle XSL Processor Bug

Description
We are currently using the XMLData class (oracle.jbo.html.databeans.XmlData)
We submit an XML document having some empty XML elements. We apply an XSL Transformation but we receive a non-conform XML Document in output!!
The problem happens when one of the XML elements is empty. Oracle XSL Processor doesn't close my open tag <textarea> with a </textarea>
XSL template:
<xsl:template name="LigneAvecDetail">
<xsl:param name="value"/>
<xsl:param name="name"/>
<xsl:param name="checkboxtag"/>
<xsl:param name="detail"/>
<tr>
<td xsl:use-attribute-sets='LigneDetailStyle'>
<xsl:choose>
<xsl:when test="string-length($value) < 1">
<input type="checkbox" value="ON" onclick="compute(this)">
<xsl:attribute name="name"><xsl:value-of select="concat('C_', $name)"/></xsl:attribute>
<xsl:attribute name="id"><xsl:value-of select="$name"/></xsl:attribute>
</input>
</xsl:when>
<xsl:otherwise>
<input type="checkbox" value="ON" onclick="compute(this)">
<xsl:attribute name="name"><xsl:value-of select="concat('C_', $name)"/></xsl:attribute>
<xsl:attribute name="id"><xsl:value-of select="$name"/></xsl:attribute>
<xsl:attribute name="checked">TRUE</xsl:attribute>
</input>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="$checkboxtag"/>
<textarea rows="2" name="S1" cols="20"><xsl:value-of select="$detail"/></textarea>
</td>
<xsl:call-template name="GroupeRadioBouton">
<xsl:with-param name="value" select="$value"/>
<xsl:with-param name="name" select="$name"/>
</xsl:call-template>
</tr>
</xsl:template>
Here my XML document:
<Results>
<DRIOQ_BilanMe_view>
<NoSommaire>1</NoSommaire>
<AutreInfo>Autre information pertinente au dossier</AutreInfo>
<IdIntervenant>1</IdIntervenant>
<PoumonsRx></PoumonsRx>
<PoumonsTdm></PoumonsTdm>
<PoumonsAutre>B</PoumonsAutre>
<PoumonsAutreDetail>Le commentaire de l'autre detail du poumon</PoumonsAutreDetail>
<OsScint></OsScint>
<OsRx>I</OsRx>
<OsRxDetail>Le commentaire du detail RX de l'os</OsRxDetail>
<OsTdm></OsTdm>
<OsTdmDetail></OsTdmDetail>
<OsAutre></OsAutre>
<OsAutreDetail></OsAutreDetail>
<FoieEnzymes>B</FoieEnzymes>
<FoieEchographie>M</FoieEchographie>
<FoieTdm>I</FoieTdm>
<FoieAutre>B</FoieAutre>
<FoieAutreDetail>Le commentaire de l'autre detail du foie</FoieAutreDetail>
</DRIOQ_BilanMe_view>
</Results>
Thanks!

This is a known bug in the HTML Output method of 2.0.2.6 which is incorrectly
outputting elements like:
<script/>
and
<textarea/>
as
<script> instead of <script></script>
and
<textarea> instead of <textarea></textarea>
This will be fixed in 2.0.2.7. The workaround
is to have some content defaulted into the <textarea> so that it's not an empty element.

Similar Messages

  • Oracle xsl processor

    How can I configure jdeveloper to use another xsl processor rather than the oracle processor?

    Remove xmlparserv2.jar, which has the XSLT clases from Classpath & add another XSLT processor to Classpath.
    Also please refer to a previous post.
    Run XSQL servlet with an alternate XSLT Processor

  • Oracle XSL Processor v2

    When I try to use the oraxsl I get the following: Exeception in
    thread "main" java.lang.NoClassDefFoundError"
    oracle/xml/parser/v2/oraxsl. Does anyone know how to fixe this?
    null

    Raymond Monroe (guest) wrote:
    : When I try to use the oraxsl I get the following: Exeception
    in
    : thread "main" java.lang.NoClassDefFoundError"
    : oracle/xml/parser/v2/oraxsl. Does anyone know how to fixe this?
    Can you provide more details as to your configuration and
    usage? If your running outside the database you need to make
    sure the xmlparserv2.jar is explicitly in your CLASS_PATH not
    simply its directory. If from the database you need to make
    sure it has been properly loaded and the JServer initialized.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

  • XDK9.2.0.2, pb with JAXP and XSL Processor

    Hello,
    I'm using XDK 9.2.0.2 and I try to use JAXP.
    I have a difference between using the Oracle XSL processor directly and through JAXP.
    Through JAXP, the processor don't care about the xsl:outpout encoding attribute !
    Why ?
    It take care of method, indent, ... but not encoding !
    I try to set the property with : transformer.setOutputProperty(OutputKeys.ENCODING, "iso-8859-1");
    It works but I don't want to do that this way !
    TIA
    Didier
    sample (from XSLSample2):
    /* $Header: XSLSample2.java 07-jan-2002.02:24:56 sasriniv Exp $ */
    /* Copyright (c) 2000, 2002, Oracle Corporation. All rights reserved. */
    * DESCRIPTION
    * This file gives a simple example of how to use the XSL processing
    * capabilities of the Oracle XML Parser V2.0. An input XML document is
    * transformed using a given input stylesheet
    * This Sample streams the result of XSL transfromations directly to
    * a stream, hence can support xsl:output features.
    import java.net.URL;
    import oracle.xml.parser.v2.DOMParser;
    import oracle.xml.parser.v2.XMLDocument;
    import oracle.xml.parser.v2.XMLDocumentFragment;
    import oracle.xml.parser.v2.XSLStylesheet;
    import oracle.xml.parser.v2.XSLProcessor;
    // Import JAXP
    import javax.xml.transform.*;
    import javax.xml.transform.dom.*;
    import javax.xml.transform.stream.*;
    public class XSLSample2
    * Transforms an xml document using a stylesheet
    * @param args input xml and xml documents
    public static void main (String args[]) throws Exception
    DOMParser parser;
    XMLDocument xml, xsldoc, out;
    URL xslURL;
    URL xmlURL;
    try
    if (args.length != 2)
    // Must pass in the names of the XSL and XML files
    System.err.println("Usage: java XSLSample2 xslfile xmlfile");
    System.exit(1);
    // Parse xsl and xml documents
    parser = new DOMParser();
    parser.setPreserveWhitespace(true);
    // parser input XSL file
    xslURL = DemoUtil.createURL(args[0]);
    parser.parse(xslURL);
    xsldoc = parser.getDocument();
    // parser input XML file
    xmlURL = DemoUtil.createURL(args[1]);
    parser.parse(xmlURL);
    xml = parser.getDocument();
    // instantiate a stylesheet
    XSLProcessor processor = new XSLProcessor();
    processor.setBaseURL(xslURL);
    XSLStylesheet xsl = processor.newXSLStylesheet(xsldoc);
    // display any warnings that may occur
    processor.showWarnings(true);
    processor.setErrorStream(System.err);
    // Process XSL
    processor.processXSL(xsl, xml, System.out);
    // With JAXP
    System.out.println("");
    System.out.println("With JAXP :");
    TransformerFactory tfactory = TransformerFactory.newInstance();
    String xslID = xslURL.toString();
    Transformer transformer = tfactory.newTransformer(new StreamSource(xslID));
    //transformer.setOutputProperty(OutputKeys.ENCODING, "iso-8859-1");
    String xmlID = xmlURL.toString();
    StreamSource source = new StreamSource(xmlID);
    transformer.transform(source, new StreamResult(System.out));
    catch (Exception e)
    e.printStackTrace();
    My XML file :
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <ListePatients>
    <Patient>
    <Nom>Zeublouse</Nom>
    <NomMarital/>
    <Prinom>Agathe</Prinom>
    </Patient>
    <Patient>
    <Nom>Stick</Nom>
    <NomMarital>Laiboul</NomMarital>
    <Prinom>Ella</Prinom>
    </Patient>
    <Patient>
    <Nom>`ihnotvy</Nom>
    <NomMarital/>
    <Prinom>Jacques</Prinom>
    </Patient>
    </ListePatients>
    my XSL file :
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="html" omit-xml-declaration="yes" indent="yes" encoding="ISO-8859-1"/>
    <xsl:template match="*|/"><xsl:apply-templates/></xsl:template>
    <xsl:template match="text()|@*"><xsl:value-of select="."/></xsl:template>
    <xsl:template match="/">
    <HTML>
    <HEAD>
    <TITLE>Liste de patients</TITLE>
    </HEAD>
    <BODY>
    <xsl:apply-templates select='ListePatients'/>
    </BODY>
    </HTML>
    </xsl:template>
    <xsl:template match='ListePatients'>
    <TABLE>
    <xsl:for-each select='Patient'>
    <xsl:sort select='Nom' order='ascending' data-type='text'/>
    <TR TITLE='`ihnotvy'>
    <TD><xsl:value-of select='Nom'/></TD>
    <TD><xsl:value-of select='NomMarital'/></TD>
    <TD><xsl:value-of select='Prinom'/></TD>
    </TR>
    </xsl:for-each>
    </TABLE>
    </xsl:template>
    </xsl:stylesheet>
    The result :
    <HTML>
    <HEAD>
    <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <TITLE>Liste de patients</TITLE>
    </HEAD>
    <BODY>
    <TABLE>
    <TR TITLE="`ihnotvy">
    <TD>`ihnotvy</TD>
    <TD></TD>
    <TD>Jacques</TD>
    </TR>
    <TR TITLE="`ihnotvy">
    <TD>Stick</TD>
    <TD>Laiboul</TD>
    <TD>Ella</TD>
    </TR>
    <TR TITLE="`ihnotvy">
    <TD>Zeublouse</TD>
    <TD></TD>
    <TD>Agathe</TD>
    </TR>
    </TABLE>
    </BODY>
    </HTML>
    With JAXP :
    <HTML>
    <HEAD>
    <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <TITLE>Liste de patients</TITLE>
    </HEAD>
    <BODY>
    <TABLE>
    <TR TITLE="C C)C(C.C/C4C6C9">
    <TD>C C)C(C.C/C4C6C9</TD>
    <TD></TD>
    <TD>Jacques</TD>
    </TR>
    <TR TITLE="C C)C(C.C/C4C6C9">
    <TD>Stick</TD>
    <TD>Laiboul</TD>
    <TD>Ella</TD>
    </TR>
    <TR TITLE="C C)C(C.C/C4C6C9">
    <TD>Zeublouse</TD>
    <TD></TD>
    <TD>Agathe</TD>
    </TR>
    </TABLE>
    </BODY>
    </HTML>

    You can also use a PrintWriter to wrap a JspWriter
    since PrintWriter has a constructor that takes any
    Writer instance.I'm having the same problem, I've spent a lot of time
    on it but I can't get it work.
    Could you post some working code that shows how you
    can do it?
    Thanks.
    It works now, I have used the code:
    result = processor.processXSL(stylesheet, xml);
    PrintWriter pw = new PrintWriter(out);
    result.print(pw);
    I had tried this before but there was an error in other place that prevented it to work.
    Thank you anyway.

  • Xsl:output function fully implemented in XSL-processor?

    I'm using XSL-processor as contained in the XML-parser version 2.0.2 in C.
    When changing the referring DTD of an incoming XML-message with following XSL-stylesheet
    <xsl:output method="xml"/>
    <xsl:output ommit-xml-declaration="no"/>
    <xsl:output standalone="no"/>
    <xsl:output doctype-system="someOther.dtd"/>
    nothing seems to happen.
    Is <xsl:output> already fully implemented in this C-version of the XSL-processor?
    Erwin

    Hi,
    The xsl:output is not yet implemented. This was specified in the README file.
    Thanks,
    Oracle XML Team
    null

  • Converting XML in WML using XSL Processor from XMLParser v2

    When trying to concert an XML doc into WML, it seems like the XSL Processor is removing some WML tags. Below are the XML doc and XSL doc I am using :
    The XML DOC
    <?xml version="1.0"?>
    <ROWSET>
    <ROW id="1">
    <NAME>RestaurantName</NAME>
    <ADDRESS>RestaurantAddress</ADDRESS>
    <PHONE_TYPE>Fixed</PHONE_TYPE>
    <PHONE>0112345678</PHONE>
    <PRICE>60</PRICE>
    <MENU>Salad, Pizza</MENU>
    <DESCRIPTION>Very good restaurant</DESCRIPTION>
    </ROW>
    <ROW id="2">
    <NAME>SecondRestaurantName</NAME>
    <ADDRESS>SecondRestaurantAddress</ADDRESS>
    <PHONE_TYPE>Fixed</PHONE_TYPE>
    <PHONE>0187654321</PHONE>
    <PRICE>60</PRICE>
    <MENU>Salad, Fish</MENU>
    <DESCRIPTION>Godd restaurant</DESCRIPTION>
    </ROW>
    </ROWSET>
    The XSL DOC
    <?xml version="1.0"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
    <WML>
    <CARD>
    <xsl:apply-templates/>
    </CARD>
    </WML>
    </xsl:template>
    <xsl:template match="ROWSET">
    <xsl:for-each select="ROW">
    <xsl:value-of select="NAME"/>
    <xsl:value-of select="ADDRESS"/>
    Phone : <xsl:value-of select="PHONE"/>
    Price of the menu : <xsl:value-of select="PRICE"/>
    You can order : <xsl:value-of select="MENU"/>
    <xsl:value-of select="DESCRIPTION"/>
    </xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>
    The
    tag are removed by the XSL Processor ; In fact it seems that any tag contained within <xsl:template match="ROWSET"> and </template> is removed. This does not occurs with other XSL processor (such as lotusxsl).
    Is there something I'm doing wrong ??

    Your examples works correctly for me using the XSLT engine that comes with release 2.0.2.6 of the Oracle XML Parser "v2" for Java.
    Are you working with this latest release?

  • How can I stop the oracle XSLT processor from inserting extra whitespace in HTML?

    How can I stop the oracle XSLT processor from inserting extra whitespace in HTML?

    Use <xsl:output mode="html" indent="no"/> as a top-level element child of your <xsl:stylesheet> element.

  • Oracle XSLT Processor

    Hi
    I am using oracle XSLT processor. There is a need to print current year in HTMl page.
    I have used year() function in xalan org.apache.xalan.lib.ExsltDatetime class to print curreent year in XSLT file. But it is not displaying anything
    Please anybody can help on this?
    My xslt looks like this
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:cal="http://www.oracle.com/XSL/Transform/java/org.apache.xalan.lib.ExsltDatetime"
    version="1.0">
    <xsl:template match="/">
    Copyright &#169; <xsl:value-of select="cal:year()">
    </xsl:template>
    </xsl:stylesheet>

    So I suppose you're using this from Java ?
    What's the version of the processor?

  • XSL Processor Parser C++

    I want to get a XSL Processor Parser C++
    but, Now XSL Processor is a java, pl/sql version.
    I want to know when a XSL Processor Parser C++ is coming soon..
    null

    Patty Bluhm (guest) wrote:
    : I'm interested in this, also and it doesn't appear to be
    : available, yet. Do you have an updated date?
    : Oracle XML Team wrote:
    : : The C++ version will be available by the end of the month.
    : : Oracle XML Team
    : : http://technet.oracle.com
    : : Oracle Technology Network
    It should be available by the end of next week.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

  • New XSL processor release 2.2.0.8 ?

    When can we expect the XSL processor release (2.2.0.8 ?) with the multi-thread bug fix?
    Thanks,
    null

    Hi,
    I replaced my previous ohw jar with ohw-2.0.6.jar: the issue regarding NPEs reported in the log when using the Tree Based TOC Navigator has been fixed. Thanks.
    But now my branding logo has disappeared. In the ohwconfig.xml file, I wrote:
    <brandings>
    <branding imageSource="/helpsets/logo.gif" />
    </brandings>
    When I use the previous jar, the image location is interpreted as:
    http://localhost:8080/ohw/help/webapp/2.0.0.0/helpsets/logo.gif
    and the logo is displayed.
    When I use the new jar, the image location is interpreted as:
    http://localhost:8080/ohw/help/webapp/HELP_MAIN_NT_050310/helpsets/logo.gif
    and the logo doesn't show. How come?
    Thanks for your help,
    Pierre

  • How to configure the Oracle XSL Mapper for ‘schemaLocation’ attribute?

    In the Transformation_1.xsl I need to have the ‘schemaLocation’ attribute defined as such:
    <inc:CaseIncidentReport xsi:schemaLocation="http://caseincidentreport.com/1.0.4 CaseIncidentReport.xsd">
    This is fine as long as long as I don’t switch to the Design tab. When I switch to the Design tab, Oracle XSL Mapper regenerates the XSL file and renders the root element as
    <inc:CaseIncidentReport>
    Can some one tell me how to configure Oracle XSL Mapper for ‘schemaLocation’ attribute? I am using BPEL Designer/JDeveloper Version 10.1.2.1.0 (Build 1915)
    Thanks,

    What do you mean by normal import? Where can I include the 'schemaLocation' attribute in the Designer? I have no trouble adding the shemaLocation in the source tab but when I switch to the design tab it always stripe it off.
    How do I file an enhancement request? I see the the XSL Mapper needs improvements.
    Thanks,
    Nathan

  • Oracle-xsl-mapper-position

    What is the exact use of oracle-xsl-mapper-position in xslt?
    Can you please help with some example.
    Thanks in advance

    oracle-xsl-mapper-position in xslt to find out the position of a node in a loop.
    For e.g.
    <Array>
         <String1></String1>
         <String2></String2>   
    </Array>
    Now if we want the position of each node in Array then we use the position() function.
    Regards,
    Anshul

  • Oracle xsl parser equivalent to msxsl:node-set()?

    Hello
    I am looking for an equivalent to the msxsl:node-set() that I can use with the Oracle xsl parser.
    Any sugestions?
    Ade

    We have ora:node-set()
    Use http://www.oracle.com/XSL/Transform/java
    as the namespace URI for the "ora" prefix.

  • Oracle XSL extensions functions

    Where can I find a list (and doc) of all the Oracle XSL extensions functions like ora:node-set?
    TIA
    Didier

    Please try this link:
    http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/appdev.920/a96621/adx05xsj.htm#1023311

  • Xsl processor and xml parser?

    Hello,
    Can someone tell me wich is the xsl processor and the xml parser used by Livecycle ES? And their versions?
    Thank you

    XML Parser parses the text representation of an XML 1.0-compliant document to make the document's information set -- elements, attributes, text, comments, processing instructions, namespace declarations -- available for access to a comptuter program.
    Without a parser, a program cannot make heads or tails of the tree of information contained in your tags.
    An XSL Processor is a program that takes an XML Document as input, along with an XSLT transformation definition (also known as a stylesheet), and effects the transformation of the source document as instructed by the stylesheet. This might mean transforming:
    <ROWSET>
    <ROW>
    <ENAME>Steve</ENAME>
    </ROW>
    </ROWSET>
    into
    <human-resources>
    <employee name="Steve"/>
    </human-resources>
    or alternatively into:
    <html>
    <body>
    <b>Steve</b>
    </body>
    </html>
    In both cases, the source XML document
    is the same, but when transformed by
    one stylesheet, it might become
    the <human-resources> XML document.
    When transformed by another stylesheet,
    it can become pretty HTML.
    To put the two terms in context, an XSL processor uses an XML parser to read the source XML document and to read the XSL transformation definition (aka stylesheet) -- since it, too, is an XML document -- and then it proceeds to transform the source into the target.

Maybe you are looking for