xsl-list
[Top] [All Lists]

RE: Huge XML data files >> XSLT

2003-02-17 03:47:12
I think he ment what XSLT processor are you using (msxml, saxon,
xalan??) ?

-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com] On Behalf Of 
Jinesh Varia
Sent: Sunday, February 16, 2003 3:55 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Huge XML data files >> XSLT

I am using Linux, running on pentium 4, 1GB RAM.

Please help!!
Jinesh

--- XSL-List Digest 
<owner-xsl-list-digest(_at_)lists(_dot_)mulberrytech(_dot_)com>
wrote:
XSL-List Digest      Saturday, February 15 2003      Volume 04 :
Number 1084



In this issue:

     RE: [xsl] [XSLT2] setting context inside funcdefs
     RE: [xsl] [XSLT2] setting context inside funcdefs
     RE: [xsl] Reference to variable cannot be resolved.
     RE: [xsl] Reference to variable cannot be resolved.
     RE: [xsl] Adding/Coercing a Namespace
     RE: [xsl] Re: Reference to variable cannot be resolved.
     [xsl] Re: Re: Reference to variable cannot be resolved.
     [xsl] Re: nxslt - .NET XSLT Command Line Utility
     [xsl] Re: Reference to variable cannot be resolved.
     Re: [xsl] [XSLT2] setting context inside funcdefs
     Re: [xsl] [XSLT2] setting context inside funcdefs
     RE: [xsl] Wrapping consecutive similar elements inside a new pare
nt element
     Re: [xsl] ANN: nxslt - .NET XSLT Command Line Utility
     RE: [xsl] Re: Re: Reference to variable cannot be resolved.
     RE: [xsl] Re: Reference to variable cannot be resolved.
     RE: [xsl] [XSLT2] setting context inside funcdefs
     [xsl] Re: Re: Re: Reference to variable cannot be resolved.
     [xsl] Re: Re: Reference to variable cannot be resolved.
     [xsl] XSLT 2 and Invalid documents
     RE: [xsl] Re: Reference to variable cannot be resolved.
     Re: [xsl] XSLT 2 and Invalid documents
     Re: [xsl] XSLT 2 and Invalid documents
     [xsl] Huge XML data files >> XSLT
     [xsl] Fwd: trouble with namespaces
     RE: xslt core and intuition was RE: [xsl] Reference to variable c
annot be resolved.
     Re: [xsl] Fwd: trouble with namespaces
     Re: [xsl] Huge XML data files >> XSLT
     [xsl] updated namespace difficulty
     [xsl] Progress indicator in Xalan?

----------------------------------------------------------------------

Date: Sat, 15 Feb 2003 08:05:00 -0000
From: "Michael Kay" <michael(_dot_)h(_dot_)kay(_at_)ntlworld(_dot_)com>
Subject: RE: [xsl] [XSLT2] setting context inside funcdefs

Hi

Inside function definitions, is there a way to set the 
context to that 
of the function call, so that I can write "local-name()" etc?

Or should I pass in the context node as argument, in addition 
to all the 
local params visible to the function call.
Then I probably  would write s.th. like 
"local-name($callers_context-node)"; which is more typing ...


You should pass all the information the function needs (unless it's
available as a global variable) in the arguments to the function call.

We banned passing the context implicitly because it prevents many
optimizations. For example, if you're doing lazy evaluation, then you
typically have to save all aspects of the context that an expression
depends on. Saving the context "just in case" the function uses it is
very expensive. It also means you can't move function calls out of
loops
and predicates such as //a[f() = 2].

Michael Kay
Software AG
home: Michael(_dot_)H(_dot_)Kay(_at_)ntlworld(_dot_)com
work: Michael(_dot_)Kay(_at_)softwareag(_dot_)com 


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

------------------------------

Date: Sat, 15 Feb 2003 08:08:30 -0000
From: "Michael Kay" <michael(_dot_)h(_dot_)kay(_at_)ntlworld(_dot_)com>
Subject: RE: [xsl] [XSLT2] setting context inside funcdefs


I just got confused by the "initially" in

   "Within the body of a stylesheet function, the focus is initially
   undefined"

which seemed to imply the possibility of setting the focus/context, 
possibly to that of the function call.


Yes, I don't like the "initially" - I've generally tried to avoid
words
in the spec that have a temporal connotation.

What it means is that you are allowed to write things like

<xsl:function...
<xsl:variable...
   <xsl:for-each select="$param">

and inside the for-each (or inside a predicate in a filter expression)
the context item is well defined.

Michael Kay
Software AG
home: Michael(_dot_)H(_dot_)Kay(_at_)ntlworld(_dot_)com
work: Michael(_dot_)Kay(_at_)softwareag(_dot_)com 


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

------------------------------

Date: Sat, 15 Feb 2003 08:11:06 -0000
From: "Michael Kay" <michael(_dot_)h(_dot_)kay(_at_)ntlworld(_dot_)com>
Subject: RE: [xsl] Reference to variable cannot be resolved.


This is really horrible.

Why should a language support a practice that must be discouraged?


It's a bicycle-shed issue. The committee spent hours wrangling and
agreed on a messy compromise that satisfies no-one.

Michael Kay
Software AG
home: Michael(_dot_)H(_dot_)Kay(_at_)ntlworld(_dot_)com
work: Michael(_dot_)Kay(_at_)softwareag(_dot_)com 


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

------------------------------

Date: Sat, 15 Feb 2003 08:16:40 -0000
From: "Michael Kay" <michael(_dot_)h(_dot_)kay(_at_)ntlworld(_dot_)com>
Subject: RE: [xsl] Reference to variable cannot be resolved.


The example given in the spec seems a bit misleading, because 
it really illustrates the restrictions of scope and not the 
practice of shadowing. The following is illegal in either spec:

<xsl:template match="/">
  <xsl:variable name="x" select="1"/>
  <xsl:variable name="x" select="$x+1"/>
  <xsl:value-of select="$x"/>
</xsl:template>


I regret to say that (unless I've missed something) the above is
completely legal in XSLT 2.0.

I fought hard to disallow this, because I know how many beginners
misunderstand variables, and lost. There are too many people steeped
in
functional programming who can't see why it's a problem.

I'm sure the debate is one that will be revived during the public
comments cycle - as I said, it's a bicycle shed issue.

Michael Kay
Software AG
home: Michael(_dot_)H(_dot_)Kay(_at_)ntlworld(_dot_)com
work: Michael(_dot_)Kay(_at_)softwareag(_dot_)com 


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

------------------------------

Date: Sat, 15 Feb 2003 08:22:40 -0000
From: "Michael Kay" <michael(_dot_)h(_dot_)kay(_at_)ntlworld(_dot_)com>
Subject: RE: [xsl] Adding/Coercing a Namespace

I haven't understood the detail of your problem, but the general
solution in XSLT 1.0 to adding a namespace that isn't statically known
is:

<xsl:variable name="a">
  <xsl:element name="p:dummy" namespace="{$param}"/.
</xsl:variable>

<some-element>
  <xsl:copy-of select="xx:node-set($a)//namespace::p"/>
</some-element>

Michael Kay
Software AG
home: Michael(_dot_)H(_dot_)Kay(_at_)ntlworld(_dot_)com
work: Michael(_dot_)Kay(_at_)softwareag(_dot_)com 

-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com 
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com] On Behalf 
Of 
Richard Lander
Sent: 14 February 2003 17:09
To: xsl-List(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Adding/Coercing a Namespace


 Morning,

=== message truncated ===


=====
-----------------------------------------------------------------
Jinesh Varia
Graduate Student, Information Systems
Pennsylvania State University
Email: jinesh(_at_)psu(_dot_)edu
-----------------------------------------------------------------
'Self is the author of its actions.'

__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com

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


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



<Prev in Thread] Current Thread [Next in Thread>