[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: stylesheet params and parsing a (MathML) string
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 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: that seems a better solution ...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. Yousualy you can't do this from a command line call but can do it if youthe 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|