OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Problem with XSLT

[ Lists Home | Date Index | Thread Index ]

XSLT and XPath questions would be better posted to the following list:

   http://www.mulberrytech.com/xsl/xsl-list

There are a number of subscribers who would enthusiastically respond to 
such questions.

There is also an *excellent* FAQ at:

   http://www.dpawson.co.uk

Helpful information regarding the Microsoft MSXML DLL can be found at:

   http://www.netcrucible.com/xslt/msxml-faq.htm

At 2003-04-14 19:15 +0530, Avinash Subramanya wrote:
>         <xsl:element name="newElement">
>              <xsl:attribute name="newAttrib">
>                   <xsl:value-of select="sampleElement/@attrib" />
>              </xsl:attribute>
>         </xsl:element>
>
>      Output XML generated is:
>
>      <newElement newAttrib="someValue">
>      </newElement>
>...
>      I am using the XmlTextWriter to generate the output XML and the above
>problem arises when I set
>      XmlTextWriter.Indentation to Formatting.Indented. What could be the
>reason???

The processor is injecting whitespace to accomplish the indentation, and 
the processor is improperly adding that whitespace to the empty element.

>      Expected output would be:
>      <newElement newAttrib="someValue" /> or  <newElement
>newAttrib="someValue"></newElement>

Yes, I agree that would be expected.

Indentation is only important to people, not to processors ... is there a 
reason you have to have the result indented?

................... Ken


--
Upcoming hands-on courses:   Europe (XSLT/XPath):    May  5, 2003
-                            Europe (XSL-FO):        May 16, 2003
- (XSLT/XPath and/or XSL-FO) North America:      June 16-20, 2003

G. Ken Holman                mailto:gkholman@CraneSoftwrights.com
Crane Softwrights Ltd.         http://www.CraneSoftwrights.com/x/
Box 266, Kars, Ontario CANADA K0A-2E0   +1(613)489-0999 (F:-0995)
ISBN 0-13-065196-6                      Definitive XSLT and XPath
ISBN 0-13-140374-5                              Definitive XSL-FO
ISBN 1-894049-08-X  Practical Transformation Using XSLT and XPath
ISBN 1-894049-10-1              Practical Formatting Using XSL-FO
Male Breast Cancer Awareness http://www.CraneSoftwrights.com/x/bc





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS