OZONE Asylum
Forums
XML - XSL - XSLT - XHTML - CSS - DOM
pass javascript variables to xsl:param
This page's ID:
22322
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Ouch! Let's try to understand one concept at a time, shall we? xsl is STYLING, transformation only. javascript is dynamic: it doesn't need a namespace at all, never ever: it gets it's extra objects from the document it belongs to, so if the document has namespaces, javascript will be able to use the entities defined in those. The namespaces are only defined for xsl to be able to map an xml document to it's tree. Now that I think about it again, there are.... hmmm... quite a few ways to achieve what you are trying to do, but what you need first is method. The scriptlets linked above belong to the xsl, as what you are trying to do is running javascript to modify xsl. You could do it the other way round: you could have javascript fully handle the xsl transformations, instead, you're trying to have javascript slightly change the way an xsl document reacts. ... I have no time, I am doing my best to answer your questions and give you pointers: as soon as I am done with my final exams, all due this week, I'll be able to plunge in xsl and "do" instead of "recommending". But so far, what I can give you is the following advices: namespaces and dtd (document type definitions) are "grammars" for the "dialects" you will want to produce using xml. Xsl itself, being a subset of xml, depends on a grammar, aka namespace. namespaces are richer than dtds and do a similar task, but discussing the details is not the point here. Lookie: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml"> http://www.w3.org/1999/XSL/Transform <-- the official xsl namespace http://www.w3.org/1999/xhtml <-- the official xhtml namespace. So yes, you can define a namespace yourself, but no, you don't need to fiddle with namespaces, although understanding the concepts behind could help. --------------- While I am busy: what you can do is debug step by step. 1) the js belongs into the xsl (for your first approach) 2) get the exact error message and read it: it shows you the line number and "type" of error, this is gold. Report the exact error message here if it sounds like Hebrew to you. 3) once you've nailed the guilty line, check what it's variables contain, track the variables. Since you made the effort to try and test, I'll be right here this weekend, trying myself to get your thing to work (it is interesting). (end of pre-exam delirium. Nurse Suho? Got black pills?) [small](Edited by [internallink=947]InI[/internallink] on 06-28-2004 16:56)[/small]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »