W3C home > Mailing lists > Public > xml-uri@w3.org > August 2002

Re: xml namespace

From: Norman Walsh <Norman.Walsh@Sun.COM>
Date: Fri, 02 Aug 2002 14:58:58 -0500
To: "Mridula Mahadevan" <mridula.mahadevan@demandtec.com>(by way of Martin Duerst <duerst@w3.org>)
Cc: xml-uri@w3.org
Message-ID: <87it2t3ud9.fsf@nwalsh.com>

/ "Mridula Mahadevan" <mridula.mahadevan@demandtec.com>(by way of Martin Duerst <duerst@w3.org>) was heard to say:
|      I am conversant with xml/xsl hence this question.
| I am trying to generate a html file from my xml using xsl and
| javax.xml.transform.transformer class. When i include the namespace in
| the xml root node (uri) i dont get any xml but if i dont include the
| html is generated according to the xsl. Is there a way i can force the
| transformer to not validate the uri?

No, but you can probably change the match patterns in your stylesheet.

  <document xmlns="urn:publicid:-:Norman+Walsh:Whatever:EN">

you may be surprised that the following template will not match the
para in the preceding document, *regardless* of the default namespace
of your stylesheet:

  <xsl:template match="para">

Instead, you must provide a QName with a prefix:

  <xsl:stylesheet xmlns:my="urn:publicid:-:Norman+Walsh:Whatever:EN"

  <xsl:template match="my:para">

If the problem is more complex than that, you'll probably have to post
a little more context for us.

                                        Be seeing you,

P.S. This is really an XSLT question and probably belongs on another list.

Norman.Walsh@Sun.COM    | Wisdom comes with age, but sometimes age
XML Standards Architect | comes alone.
Sun Microsystems, Inc.  | 
Received on Saturday, 3 August 2002 10:09:04 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:32:45 UTC