That was the issue, thanks!



shathawa wrote:
> 
> The issue you are experiencing resolves around the "text" output
> method.  If you use the "xml" output method (which is default),
> the results would be as you expect.
> 
> The "text" output method does not serialize the xml elements.
> Only the text content of the elements is serialized.
> 
> Sincerely,
> Steven J. Hathaway
> 
>>
>>
>> I'm using a C++ version of Xalan 1.10 under Windows and I'm trying to
>> produce an Apache FOP file out of an xml document.
>>
>> The files are rather large and complex, but the following samples
>> illustrate
>> the problem just fine:
>>
>> Input.xml
>> ----------
>> <?xml version="1.0" encoding="utf-8"?>
>>   <root-xml-element>
>>     <MyElement name="Some text"/>
>>   </root-xml-element>
>>
>> Stylesheet.xsl
>> --------------
>> <xsl:transform version="1.0"
>>            xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
>>            xmlns:fo="http://www.w3.org/1999/XSL/Format";>
>>   <xsl:output method="text" indent="no"/>
>>
>>   <xsl:template match="/">
>>     <fo:root>
>>       <xsl:text>(ROOT MATCHED)</xsl:text>
>>       <xsl:apply-templates select="root-xml-element"/>
>>     </fo:root>
>>   </xsl:template>
>>
>>   <xsl:template match="root-xml-element">
>>     <xsl:text>(ROOT ELEMENT MATCHED)</xsl:text>
>>     <xsl:call-template name="MyTemplate"/>
>>   </xsl:template>
>>
>>   <xsl:template name="MyTemplate">
>>     <xsl:text>(MY TEMPLATE MATCHED)</xsl:text>
>>       <fo:layout-master-set>
>>         <fo:simple-page-master master-name="Master" page-width="29.7cm"
>> page-height="21cm">
>>         </fo:simple-page-master>
>>       </fo:layout-master-set>
>>   </xsl:template>
>> </xsl:transform>
>>
>> The transformation completes without any errors but produces the
>> following
>> incomplete output:
>>
>> Output file from Xalan
>> ---------------------
>> (ROOT MATCHED)(ROOT ELEMENT MATCHED)(MY TEMPLATE MATCHED)
>>
>> As you can see, there are no <fo:...> tags in the output file. The
>> template
>> obviously does get applied.
>>
>> When I run a .NET xslt processor against those very same files, I get the
>> output I expect:
>>
>> Output file from a .NET XSLT processor
>> ---------------------------------------
>> <?xml version="1.0" encoding="utf-8"?>
>>   <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
>>    (ROOT MATCHED)(ROOT ELEMENT MATCHED)(MY TEMPLATE MATCHED)
>>     <fo:layout-master-set>
>>       <fo:simple-page-master master-name="Master" page-width="29.7cm"
>> page-height="21cm" />
>>     </fo:layout-master-set>
>>   </fo:root>
>>
>> The same transformation also works when applied from Java Xalan version
>> (don't know exactly which one). On the other hand the command-line Xalan
>> executable produces the same incomplete output, so the chances are it's
>> not
>> my code that messes up something (or is it?).
>>
>> What's going on here? Any ideas what to check?
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Parts-missing-in-an-XSLT-transformation-output-tp33383952p33383952.html
>> Sent from the Xalan - C - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Parts-missing-in-an-XSLT-transformation-output-tp33383952p33398109.html
Sent from the Xalan - C - Users mailing list archive at Nabble.com.

Reply via email to