xsl-list
[Top] [All Lists]

Re: invoking template for other namespace elements in mixed namespace scenario (sample XML & XSL)

2004-09-08 09:09:07

  The thing is the XHTML elements are not prefixed by xhtml in the data
  that is made available from InfoPath. Does that mean it lies in the null
  namespace? 

It doesn't matter whether they are prefixed or not It just matters if
they are in the xhtml namespace (if they are not,it's confusing to call
them "XHTML elements)

  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xmlns:xhtml="http://www.w3.org/1999/xhtml";
  xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2004-0
  8-25T18:09:45" 
  xmlns:xd="http://schemas.microsoft.com/office/infopath/2003";
  xml:lang="en-us"

If thay are the only declarations you have then unprefixed elements are
in no-namespace. (so html, b etc are not xhtml, they are just some well
formed xml that uses the same names as html)

  They may or may not be XHTML Schema Valid)

They will not be schema valid as they are not in the xhtml namespace so
they will all be unknown elements according to taht schema (not that
XSLT cares)

Your source would need
xmlns="http://www.w3.org/1999/xhtml";
to make unprefixed elements be XHTML.



  Do I need to prefix these templates with xhtml: ??

  <xsl:template match="table">
  ...
  </xsl:template>
  <xsl:template match="colgroup">

You would have to prefix them to match xhtml elements but it seems that
your source elements are in no-namespace in which case these templates
will match.

david

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________


<Prev in Thread] Current Thread [Next in Thread>