Hi,

Previously I was not doing the same but I tried the following :

1. documentBuilder set to namespace aware

        DocumentBuilderFactory documentbuilderfactory =
DocumentBuilderFactory.newInstance();
        documentbuilderfactory.setNamespaceAware(true);
        InputSource inputsource = new InputSource(new StringReader(s));
        org.w3c.dom.Document document =
documentbuilderfactory.newDocumentBuilder().parse   
        (inputsource);
        return document;

2. Included namespace in the input parameter XML 

<?xml version="1.0" encoding="UTF-8"?>
<orm:locations xmlns:orm="http://www.somenamespace.com/schema";>
 <orm:location>
          <orm:name>001</orm:name>
          <orm:value>Bangalore</orm:value>
        </orm:location>
<orm:location>
          <orm:name>002</orm:name>
          <orm:value>Chandigarh</orm:value>
        </orm:location>
  </orm:locations>

3. Included namespace in stylesheet

<?xml version="1.0" encoding="ISO-8859-1"?> 
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:orm="http://www.somenamespace.com/schema";>
    <xsl:output method="xml" indent="yes" encoding="ISO-8859-1"
standalone="yes"/> 
    <xsl:param name="ORM_DATA"/>
    <xsl:template match="*"> 
            <client><xsl:value-of select="clientId"/></client> 
            <ordernumber><xsl:value-of select="orderId"/></ordernumber> 
            <deliverydate><xsl:value-of
select="deliveryDate"/></deliverydate> 
            <bill><xsl:value-of select="bill"/></bill>
            <area><xsl:value-of
select="$ORM_DATA/locations/location[name=001]/value"/></area>
    </xsl:template> 
</xsl:stylesheet>


Unfortunately, I am still getting the same error.

Gaurav



keshlam wrote:
> 
> Are you sure you're building a namespace-aware DOM?
> 
> ______________________________________
> "... Three things see no end: A loop with exit code done wrong,
> A semaphore untested, And the change that comes along. ..."
>   -- "Threes" Rev 1.1 - Duane Elms / Leslie Fish
> (http://www.ovff.org/pegasus/songs/threes-rev-11.html)
> 

-- 
View this message in context: 
http://www.nabble.com/Passing-XML-as-input-parameter-to-XSLT-Transformer-tf3763982.html#a10713548
Sent from the Xerces - J - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to