You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Broeglin Dominique <br...@essi.fr> on 2000/01/12 15:48:56 UTC

DTM bug ???

	Hello,

	I'm new at this list so excuse me if I repeat something already said. 

	Having tried Xalan for some days I've build a little application using
a SAX source to produce HTML output.

	My code looks like this :

	    XSLTResultTarget result = new XSLTResultTarget(System.out);
	    XSLTProcessor processor = XSLTProcessorFactory.getProcessor();
	    
    	    DTM dtm = new DTM ();
	    AttributeListImpl attrs = new AttributeListImpl ();

	    dtm.startDocument ();
	    dtm.startElement ("result", attrs);
	    
	    attrs.addAttribute ("objectclass", "CDATA", "toto");
	    attrs.addAttribute ("cn", "CDATA", "dargham");
	    dtm.startElement ("user", attrs);
	    dtm.characters ("Dargham".toCharArray (), 0, 7);
	    dtm.endElement ("user");

	    dtm.endElement ("result");
	    dtm.endDocument ();

	    dtm.dump ();

 	    processor.process(new XSLTInputSource(dtm.getNode (0)),
 			      new XSLTInputSource("toto.xsl"),
			      result);


	I obtained always an empty chain when using :
	<xsl:value-of select="/result/user/@objectclass" />

	A line 588 in DTM.java I found a mistake :

        w3 = stringToInt(name);

	should be

        w3 = stringToInt(attrname);

	Once this corrected the dump seemed more correct. But my result is
still wrong 
	<xsl:value-of select="/result/user/@objectclass" /> expands in dargham
instead of toto

	Does someone know more about this ? Any help would be welcome... ;-)

	Dom