This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re: Copying nodes from other than the input file


Maik Stührenberg wrote:
> Thank you both Joerg and Michael, using <xsl:copy-of 
> select="document(MetaData/Technical/Location) /xhtml:html/xhtml:head"/> 
> works, but only if I declare the namespace prefixed 
> (xmlns:xhtml="http://www.w3.org/1999/xhtml";) and not as default namespace 
> (xmlns="http://www.w3.org/1999/xhtml";) in the XSLT. So, if have to change 
> all previously inserted XHTML elements to prefixed elements...

Right. The default namespace in the stylesheet only applies to literal result
elements, not XPath expressions or XSLT match patterns. In an XSLT match
pattern or an XPath expression, no prefix means no namespace, and if you need
to use a non-null namespace, you have to use a prefix. Whenever you use a
prefix, no matter where it is, of course it must be bound to a namespace name
(URI) in that same document.

   - Mike
____________________________________________________________________________
  mike j. brown                   |  xml/xslt: http://skew.org/xml/
  denver/boulder, colorado, usa   |  resume: http://skew.org/~mike/resume/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]