Subject: RE: [xsl] adding a namespace to a stylesheet automatically From: "Michael Kay" <mhk@xxxxxxxxx> Date: Tue, 28 Oct 2003 23:46:27 -0000 |
This is of course the scenario that motivated xpath-default-namespace in XSLT 2.0. Michael Kay > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of > Lars Huttar > Sent: 28 October 2003 22:00 > To: XSL-List (E-mail) > Subject: [xsl] adding a namespace to a stylesheet automatically > > > Hi all, > > Suppose you write a stylesheet to process a source document > that has no namespace. > > Then you decide to add a namespace to the source document: > <doc xmlns="scribble"> ... </doc> > > So now everywhere in your stylesheet that you want to select > or match elements in the source document, you have to > insert a prefix. > > E.g. you have to change > > <xsl:template match="foo"> > <xsl:if test="parent::bar[@baz] = /*/squid">...</xsl:if> > > into > > <xsl:template match="myns:foo"> > <xsl:if test="parent::myns:bar[@baz] = /*/myns:squid">...</xsl:if> > > Has anyone written a program (e.g. a stylesheet) to do this > automatically? > > Thanks, > Lars > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] adding a namespace to a style, Lars Huttar | Thread | RE: [xsl] adding a namespace to a s, Lars Huttar |
RE: [xsl] Data not displaying in HT, Michael Kay | Date | RE: [xsl] adding a namespace to a s, Lars Huttar |
Month |