This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: element with namespace
- From: "Venkateshwar Bommineni" <vbommineni at elogex dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Mon, 30 Sep 2002 14:35:08 -0400
- Subject: RE: [xsl] element with namespace
- Reply-to: xsl-list at lists dot mulberrytech dot com
But even if i remove those and mention as <Test
xmlns="http://www.foo.com/namespace/v1">
I do get same blank output. How do I actually need to mention in XSL to
skip or match with particular namespace?
-----Original Message-----
From: Shaikh, Neelkamal (MED, Oracle)
[mailto:Neelkamal.Shaikh@med.ge.com]
Sent: Monday, September 30, 2002 1:56 PM
To: 'xsl-list@lists.mulberrytech.com'
Subject: RE: [xsl] element with namespace
need to correct the "xsi:schemaLocation" value in the Input XML file :
<Test xmlns="http://www.foo.com/namespace/v1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.foo.com/namespace/v1
C:\schema\definition.xsd">
if your schema is available in "C:\schema\" , then why is
"http://www.foo.com/namespace/" being used in xsi:schemaLocation.
-----Original Message-----
From: Venkateshwar Bommineni [mailto:vbommineni@elogex.com]
Sent: Monday, September 30, 2002 11:38 AM
To: xsl-list@lists.mulberrytech.com
Subject: [xsl] element with namespace
Hi all,
I am having a problem while trying to match root element which has
namespace declaration.
here is the test snippet i am trying ..
Input XML is:
-------------------------------------------------------
<?xml version="1.0"?>
<Test xmlns="http://www.foo.com/namespace/v1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.foo.com/namespace/v1
C:\schema\definition.xsd">
<People>
<Person>
<FName>fname1</FName>
<LName>lname1</LName>
</Person>
<Person>
<FName>fname3</FName>
<LName>lname3</LName>
</Person>
</People>
</Test>
Input XSL is:
---------------------------------------------------------------
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<Members>
<xsl:apply-templates select="Test/People"/>
</Members>
</xsl:template>
<xsl:template match="People">
<xsl:for-each select="Person">
<Member><xsl:value-of
select="concat(substring(LName,1,1),'.',FName)"/></Member>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Output of above transformation results:
---------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<Members/>
And if remove the namespace declaration from my input xml it works fine.
So is that namespace declaration not allowed or is there any magic
property i need to set in XSL to ignore namespace declarations?
thanks in advance
Venkat
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list