[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

msxsl bug?

  • From: "Barry MacKichan" <barrym@h...>
  • To: <xml-dev@i...>
  • Date: Mon, 6 Apr 1998 18:30:52 -0700

msxsl bug
I've been working with Microsoft's msxsl program, to apply their xsl style
sheets to xml documents to produce an html file.

Is the following a bug, or do I not understand xsl?

My xml file is:

<base>
 <node>
  <L1>Line 1</L1>
  <L2>Line 2</L2>
  <L3>Line 3</L3>
  <L2>Another Line 2</L2>
  <L1>Another Line 1</L1>
 </node>
</base>

My xsl file is using the <select-elements> element to select the <L1> and
<L2> elements first, and then to select the <L3> elements.  The problem is
that apparently I can select only the <L1> elements OR the <L2> elements,
but not both.

I am inferring that it is possible to select multiple kinds of elements,
from the way selection for rules works.  If it is not possible to select
multiple kinds of elements, then Microsoft's claim that you can use xsl to
re-order the children of an element seems pretty weak: you can only do it
when there are only two kinds of children in an element.

My xsl file is:

<xsl>
 <rule>
  <root/>
  <HTML>
   <BODY>
    <children/>
   </BODY>
  </HTML>
 </rule>

 <rule>
  <target-element type="node"/>
  <select-elements>
//***** here is the problem ******
   <target-element type="L2"/>
   <target-element type="L1"/>
//***** end of problem area
  </select-elements>
  <select-elements>
   <target-element type="L3"/>
  </select-elements>
 </rule>

 <rule>
  <target-element type="L1"/>
  <h2><children/></h2>
 </rule>

 <rule>
  <target-element type="L2"/>
  <h2><children/></h2>
 </rule>

 <rule>
  <target-element type="L3"/>
  <h2><children/></h2>
 </rule>

</xsl>

I would expect output to look like:

Line 1
Line 2
Another Line 2
Another Line 1
Line 3

but I get

Line 1
Another Line 1
Line 3

That is, the select-elements with multiple criteria ignores all the criteria
but the last.

Can anybody set me straight?  TIA

--Barry MacKichan




xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.