Ryan,
I tried your example on my system and it works fine, the script elements are in the correct xhtml namespace. I suspect that your actual case is slightly different, is it possible that you're getting the script nodes externally? I'm thinking (just a wild guess) that you may have something like this, which would produce something like the result you describe. let $config := <config> <script src="/shared/script/jquery.scrollTo.packed.js" type="text/javascript"> </script> <script src="/shared/script/jquery.easIng.packed.js" type="text/javascript"></script> </config> let $script := $config/script return <html xmlns="http://www.w3.org/1999/xhtml"> <head>{$script}</head> <body> </body> </html> --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script src="/shared/script/jquery.scrollTo.packed.js" type="text/javascript" xmlns=""/> <script src="/shared/script/jquery.easIng.packed.js" type="text/javascript" xmlns=""/> </head> <body></body> </html> _____ From: [email protected] [mailto:[email protected]] On Behalf Of Ryan James Dew Sent: Friday, October 02, 2009 6:14 PM To: [email protected] Subject: [MarkLogic Dev General] xmlns attribute creates empty xmlns attribute on children I noticed an issue with setting the xmlns attribute when using MarkLogic to display html pages. With the following xqy file I get the latter results. This will often cause the javascript files to not load properly. I could just remove the xmlns attribute, but knowing what can happen in IE quirks mode, I would rather have 100% valid pages. Is this a known bug or is there a known work around? Thanks, Ryan xdmp:set-response-content-type( "text/html" ), '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">', <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> {$title} </title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style type="text/css"> </style> <script src= "/shared/script/jquery.makeVisible.packed.js" type="text/javascript"> </script><script src="/shared/script/jquery.scrollTo.packed.js" type="text/javascript"> </script><script src="/shared/script/jquery.easIng.packed.js" type="text/javascript"> </script><script src="/resources/script/pages/article/article.js" type="text/javascript"> </script> </head> <body> </body> </html> Results: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> Title </title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style type="text/css"> </style> <script src= "/shared/script/jquery.makeVisible.packed.js" type="text/javascript" xmlns="" > </script><script src="/shared/script/jquery.scrollTo.packed.js" type="text/javascript" xmlns=""> </script><script src="/shared/script/jquery.easIng.packed.js" type="text/javascript" xmlns=""> </script><script src="/resources/script/pages/article/article.js" type="text/javascript" > </script> </head> <body> </body> </html> NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
_______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
