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

Re: stylesheet params and parsing a (MathML) string

Subject: Re: stylesheet params and parsing a (MathML) string
From: Manolis Mavrikis <M.Mavrikis@xxxxxxxx>
Date: Mon, 24 Nov 2003 01:16:51 +0000
stylesheet advance

David wrote:


but then you'd have to declare that namespace again to match on the
elemens so simpler is probably to put them all in no-namespace
xsl:element isn't needed if your element names are known in advance so
I'd use literal result elements and locally switch the default namespace so instead of

[...]

do

<xsl:variable name="tree" xmlns="">
<myTree id="{$param1}">
<xsl:value-of select="$param2"/>
</myTree>
</xsl:variable>



My elements are know in advance but for attribute values I was really using a function and I never thought of using:


<myTree id="substring-before($params,'|')">

which now works.

David, Thanks (once again) for your prompt,accurate and extremely useful reply

I still don't get it though. Out of curiosity shouldn't elements created with <xsl:element> be in the namespace of their conttainer ?

---

For the other part:

If $param2 is a string thaen as you say you'll need a parser.
some systems (eg saxon) provide extension functions to parse a string
(and in msxml you could easily write an jscript extension function to do
this) alternatively (and better in many cases) is to pass a node set
representing a parsed document in as the parameter then you can apply
templates directly to it and dont need nodeset() at all.

that seems a better solution ...

Yousualy you can't do this from a command line call but can do it if you
are calling xslt from any kind of script or API.


the stylesheet **will be called from a java.xml tranformer and xalan will process it. I 'll try do it later and I hoping that xalan will understand the node parameter... meanwhile if anyone has any advice (eg. what java object should I send?) it would be very useful.

Thanks again,

Manolis


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



Current Thread

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.