On 6/23/05, Kahlil Johnson <jzarecta(_at_)gmail(_dot_)com> wrote:
Right what about the 'foo' part? is it the identifier. For example in
quanta I saw that a tag like <p name="text"> will represent it as
<p:text> is that the 'foo' means?
I think there is some slight confusion here. foo would be the element
name, office would be the namespace it belongs too. I'm not 100% sure
what you mean about quanta. I'd recommend picking up "XML in a
Nutshell". These aren't xslt concepts, but XML concepts.
If you see the tag <p name="text"> that means it's the opening tag of
the element called p in the default namespace with an attribute of
text.
Your second is the opening tag for the element named text in the
namespace p with no attributes.
To select the first one in xslt you would want something like
<xsl:template match="p">
<!-- generate some stuff here -->
</xsl:template>
to match the second you need to have the namespace declared earlier in
the docs (an faq or tutorial should explain more.)
<xsl:template match="p:text">
<!--generate some stuff here -->
</xsl:template>
And of course you would have needed to declare the namespace in
stylesheet to do this ie:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:p="http://somenamespacecalledp">
Perhaps you might want to skim through some more tutorials or the
specs at http://www.w3c.org
Jon Gorman
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--