- 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
/ "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.
Given:
<document xmlns="urn:publicid:-:Norman+Walsh:Whatever:EN">
<para/>
</document>
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">
...
</xsl:template>
Instead, you must provide a QName with a prefix:
<xsl:stylesheet xmlns:my="urn:publicid:-:Norman+Walsh:Whatever:EN"
xmlns:xsl="..."
...>
<xsl:template match="my:para">
...
</xsl:template>
If the problem is more complex than that, you'll probably have to post
a little more context for us.
Be seeing you,
norm
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