[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: How to insert a snippet of XSD into HTML using se

Subject: Re: How to insert a snippet of XSD into HTML using serialize(), without the result containing a bunch of namespaces? Way to suppress the output of namespace declarations?
From: "G. Ken Holman g.ken.holman@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 12 Jun 2015 13:17:04 -0000
Re:  How to insert a snippet of XSD into HTML using  se
At 2015-06-12 13:05 +0000, Costello, Roger L. costello@xxxxxxxxx wrote:
In my XSLT, I am using the new serialize function to output the Title element:

<xsl:value-of select="serialize(//xs:element[@name eq 'Title'])" />

You are addressing a node in the tree with the XSD namespace nodes attached to the element node you are addressing. Those namespace nodes are being serialized.


However, when I view the HTML document in a browser, I see a bunch of namespace declarations bundled with the Title element:

Because they are part of the node tree you are asking to serialize.


I don't want all those namespace declarations. How do I omit them?

Create a copy without the namespaces you don't want (but what you create will still have to be well-formed).


I tried adding a serialization parameter to the serialize function:

I don't think that will help ... I don't think serialization suppresses information you are already asking to serialize.


<xsl:value-of select="serialize((//xs:element[@name eq 'Title'], $output-serialization-parameters)" />

That had no effect.

That doesn't surprise me.


I hope this helps.

. . . . . . Ken


-- Check our site for free XML, XSLT, XSL-FO and UBL developer resources | Free 5-hour lecture: http://www.CraneSoftwrights.com/links/video.htm | Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ | G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx | Google+ profile: http://plus.google.com/+GKenHolman-Crane/about | Legal business disclaimers: http://www.CraneSoftwrights.com/legal |


--- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.