Go Back   CodingForums.com > :: Client side development > XML

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-06-2011, 12:11 PM   PM User | #1
apnausman
New to the CF scene

 
Join Date: Jun 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
apnausman is an unknown quantity at this point
Thumbs down Default namespace and XSLT

Hi,

I got a default namespace as xmlns="path/to/default/namespace/" in my xml file, and following is what I am using for xsl file:
Code:
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:h="path/to/default/namespace/"
  exclude-result-prefixes="h"
  xmlns="http://www.w3.org/1999/xhtml">
It is not working, just breaks the page. when I remove the attribute xmlns from xml file then it works fine, but with default namespace it doesn't.

Is there anyone tell me how can i get it working with default namespace?

Thanks.

Last edited by apnausman; 06-07-2011 at 11:19 PM..
apnausman is offline   Reply With Quote
Old 06-07-2011, 07:01 AM   PM User | #2
Dormilich
Senior Coder

 
Dormilich's Avatar
 
Join Date: Jan 2010
Location: Behind the Wall
Posts: 2,881
Thanks: 9
Thanked 291 Times in 287 Posts
Dormilich is on a distinguished road
either you access the XML elements with the h: prefix in your XSL or you change the XSL’s default namespace.
__________________
please post your code wrapped in [CODE] [/CODE] tags
Dormilich is offline   Reply With Quote
Old 06-07-2011, 11:22 PM   PM User | #3
apnausman
New to the CF scene

 
Join Date: Jun 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
apnausman is an unknown quantity at this point
I tried using with h: but didn't work, what should I change to for default namespace?
apnausman is offline   Reply With Quote
Old 06-11-2011, 11:24 AM   PM User | #4
pgbxbrl
New to the CF scene

 
Join Date: Jun 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
pgbxbrl is an unknown quantity at this point
Hi,

I also have this problem now, where the Xpath/XSLT navigation doesn't work if there is a default namespace in the XML file.

Any solutions to this?
pgbxbrl is offline   Reply With Quote
Reply

Bookmarks

Tags
default namespacce, xml, xsl, xslt

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:03 PM.


Advertisement
Log in to turn off these ads.