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

Re: Some basic things

Subject: Re: Some basic things
From: Joerg Heinicke <joerg.heinicke@xxxxxx>
Date: Wed, 31 Jul 2002 04:12:06 +0200
basic things of xml
ashu t wrote:
Here are some things which i am little confused about.
(1)
<xsl:apply-templates/> and
<xsl:apply-templates select="*"/>
are they not same?

No.


I have read about this on this linkshttp://www.w3.org/TR/xslt#strip
http://www.w3.org/TR/xslt#section-Applying-Template-Rules
but I am bit confused as select ="*" will not process text node ?? or it will process?

No, it won't.


(2)
And one other thing is about overriding template rule :
If i write <xsl:template match="some node"/>
then what does it do
(1)It will not process this node and move to process nodes which are children of it. or

Wrong.


(2)It will leave all the nodes unprocessed between
<some node> and </some node> and move to next node to process

Correct.


(3)
And if we have more than one predicate in some template match like
<xsl:template match ="text()[preceding-sibling::node()[1][self::input][not(normalize-space())]]
then how we interpre it (from left to right or right to left)

From left to right. Try to see a predicate as filter:


only these text nodes [which have a preceding-sibling node[which is the directly preceding-sibling node][which has the name 'input'][which has no non-whitespace text]]

May be these are very basic things and should be known to every one but i am not getting it correctly while reading material on w3 site.
can any one explain this
ashu

ashu t wrote: > some time we use "."(dot) and some time "*"(astrics)

. means the context node. It's the same as self::node().

* means the child elements. It's the same as child::*.

> like
>  count( . | key('somename', @name)[1] ) = 1

Muenchian Grouping: you are testing whether . (the context node or currently tested node) is the same node as this one returned by key('somename', @name)[1].

> and
> select=" *|@

*|@* means child elements and attributes. It's the same as child::*|attribute::*.

Have a look at http://www.w3.org/TR/xpath#location-paths and http://www.w3.org/TR/xpath#path-abbrev

Does this help a bit?

Regards,

Joerg


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



Current Thread
  • Some basic things
    • ashu t - Mon, 29 Jul 2002 11:01:59 -0400 (EDT)
      • Joerg Heinicke - Tue, 30 Jul 2002 22:12:14 -0400 (EDT) <=
      • <Possible follow-ups>
      • ashu t - Mon, 29 Jul 2002 11:09:46 -0400 (EDT)
      • ashu t - Wed, 31 Jul 2002 11:28:47 -0400 (EDT)

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
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.