This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Can one <xsl:choose> <xsl:output>?


xsl:output is a top-level element and does not have such
an attribute. In other words, you can't place xsl:output
as a child of anything except xsl:stylesheet. Moreover,
XSLT does not care what DTD or schema the incoming XML 
conforms to nor is one even required. You can place
a paramater (xsl:param) at the top of your stylesheet
and arrange to pass in some type of flag or paramater
to indicate what processing should be attempted:

<xsl:stylesheet>
 <xsl:param name="flag"/>
 <xsl:choose>
  <xsl:when test="$flag='ABChartData'">
   ...
  </xsl:when>
  <xsl:otherwise>
   ...
  </xsl:otherwise>
 </xsl:choose>
</xsl:stylesheet>

Within the body of the when and otherwise you can code the processing
that should be attempted on your XML. However, the XSLT never really
cares what the DTD or schema the XML may or may not conform to.
Hope this helps.

Regards,

Dan

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]