Subject: Re: [xsl] Schema declarations showing up in my html From: Spencer Tickner <spencertickner@xxxxxxxxx> Date: Fri, 1 Apr 2005 15:39:39 -0800 |
Realized i should probably post my schema declaration as well xml <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="../Styles/xslt_2.xsl"?> <act xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Styles/ActSchema.xsd"> On Apr 1, 2005 3:36 PM, Spencer Tickner <spencertickner@xxxxxxxxx> wrote: > Ok, I'll give that a try > > for reference: a sample of > > xslt > > <xsl:template match="paragraph" mode="contentsection"> > <p class="para">(<xsl:copy-of select="paragraphnumber"/>) > <xsl:copy-of select="paragraphtext"/></p> > <xsl:apply-templates/> > </xsl:template> > > xml > > <paragraph> > <paragraphnumber>a</paragraphnumber> > <paragraphtext>to continuously or repeatedly observe a service > provider, doctor who provides abortion services or patient or a > building in which any of them resides or in which abortion services > are provided, or</paragraphtext> > </paragraph> > > html > > <p class="para">(<paragraphnumber > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">a</paragraphnumber>) > <paragraphtext > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">to continuously > or repeatedly observe a service provider,</paragraphtext></p> > > ok, so that's what's happenning so far. I suspected that it is in > scope for the element using the copy-of statement, however if I can > figure out a way to get rid of it it would be nice. I realize that > anyone with a little experience and time can parse out our html but > I'd rather not hand our content over to them already enclosed in xml > tags. > > Anyway I'll give you're suggestion a shot David. Thanks very much for the posts > > Spence > > On Apr 1, 2005 3:26 PM, David Carlisle <davidc@xxxxxxxxx> wrote: > > > > > I realize this may be more of a .net question, but u guys are so much > > > better than those other forums. > > > > I suspect that it's just an xslt question, but it's hard to be sure as > > you only posted your .net code which I don't think is relevant. > > > > > > <element xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">elementvalue</element> > > > > every single time I do a <xsl:copy-of select="element" in my xsl > > > > when you do copy-of you copy a node and it gets copied along with all > > its namespaces children attributes etc, so presumably the xsi namespace > > was in scope on the element that you copied. If this namespace is not on > > any ancestor node in the result, copying the namespace node for this > > element will cause a namespace declaration to be output. > > > > if you wouldn't mind just getting one xmlns:xsi at the top level just > > make sure that your top level result element uses this namespace. > > > > If you don't want this namespace at all, then you either need to make > > sure it is not in your source, or make sure you don't copy it > > for example replace > > <xsl:copy-of select="element"/> > > by > > <xsl:element name="element"> > > <xsl:copy-of select="@*"/> > > </xsl:element> > > > > If the xsi namespace isn't in your source, then my guess is wrong and > > you can ignore all the above. > > > > 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 > > ________________________________________________________________________
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Schema declarations showi, Spencer Tickner | Thread | Re: [xsl] Schema declarations showi, David Carlisle |
Re: [xsl] Schema declarations showi, Spencer Tickner | Date | Re: [xsl] WordML question (was Re: , senetex |
Month |