Jump to content

default namespace


gantait

Recommended Posts

My xml structure is like that<?xml version="1.0" encoding="UTF-8" ?> - <Module version="90020900" xmlns="http://xmlns.oracle.com/Forms">for that namespace URI my xpath is not working mens in xslt i'm giving one xpression to get some node value ....but in xml if xmlns="http://xmlns.oracle.com/Forms" is there it is not working..if i delete that xslt woking fine....how to handle this case in my xslt...pls give me the syntax..i'm new to it...this is my xslt structure...<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet version="2.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:forms="http://xmlns.oracle.com/Forms"><xsl:template match="/"> <html>........................

Link to comment
Share on other sites

When you match an element with this namespace for the first time (apparently, the root element "Module" itself) you'll have to write the namespace URI in parenthesis after it. For example:

<xsl:copy-of select="/Module{http://xmlns.oracle.com/Forms}"/>

oh, and you don't need to include the namespace in the XSLT file, unless of course you're using it in the output.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...