Hi,
Thanks. Like I mentioned earlier, the xml is embedded inside the html
and I would like to get to the xml using the identity transform. I didn't
realize that doing the above will give rise to the problem of some <td>s
being in no-namespace and some in the <urn:hl7-org/v3>. I will have to
check on using
<td xmlns=""> to see if the html renderer will support this.
I however got good results when I used <xsl:template match="node
()[local-name() = 'table'] etc. An article I read on the web discouraged
using local-name b'cos it strips the prefixes. The recommended one was
<xsl:template match="node()[not(starts-with(name(), "b:"))]. But this
wouldn't work when the elements are in the default namespace and do not
have a prefix on them as in my case.
Ofcourse, using local-name would not work for the case when my xml input
itself is xhtml. Then I would have html interspersed with xhtml. Is this
possible.
Your suggestions are appreciated.
Cheers,
Omprakash.V
David
Carlisle To:
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
<davidc(_at_)nag(_dot_)c cc: (bcc:
omprakash.v/Polaris)
o.uk> Subject: Re: [xsl] filtering
elements using identity transform
03/31/2005
07:10 PM
Please
respond to
xsl-list
] You were right. There was an xmlns in my xhtml input and Iam
] surprised nobody saw it because it was there in the xhtml snippet I
posted
] yesterday.
we needed to know if there was (or was not) one on the top level
element. Your latest posting shows that there is not one.
] <html>
] <head>
]
] </head>
] <body>
] <p>
] <table>
] <tr>
so these are html elements in no-namespace.
A template such as match="p" would match these elements
] <slideshow author="Yours Truly" title="Sample Slide Show" date
] ="Date of publication" xmlns="urn:hl7-org/v3">
here you change to the namespace urn:hl7-org/v3
] <td>
The namespace urn:hl7-org/v3 is still in effect here so this is not td in
no-namespace but is td in the namespace urn:hl7-org/v3
match="td" will therefore _not_ match this element.
You could use
match="v3:td" xmlns:v3="urn:hl7-org/v3 "
but most likely to intend this td element to be in the same namespace
as the surrounding <table> in which case your input is in error and you
need <td xmlns="">
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
________________________________________________________________________
--~------------------------------------------------------------------
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>
--~--
This e-Mail may contain proprietary and confidential information and is sent
for the intended recipient(s) only.
If by an addressing or transmission error this mail has been misdirected to
you, you are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction,
dissemination, copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its
attachment other than by its intended recipient/s is strictly prohibited.
Visit Us at http://www.polaris.co.in
--~------------------------------------------------------------------
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>
--~--