[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Global namespace prefixes (Corrected Examples)
> Does cause my Xerces XSLT processor to use it, which although I'm > still stuck with all the namespace declarations at least the prefix is > consistent. as shown you can force the declaration of the prefix on the top level element by sticking a att::foo attribute there, or as Michael showed, making an attribute in a temporary node set variable using exslt:node-set which xalan (not xerces, which is an xml parser) does support, and then copying the namespace node. <!ENTITY NBSP "<xsl:text disable-output-escaping='yes'>&nbsp;</xsl:text>" > eek never use d-o-e unless you really need to, and even then don't do it unless you really really need to. here you coukld just use   instead of &NBSP; and make the stylesheet a lot more portable and robust. <xsl:template match="/dap:Dataset"> <rdf:RDF xml:base="{$XML_BASE}" > <owl:Ontology here is where you can add the namespace declation for your att prefix. Note however that I think that xml:base declaration is in error as xml:base as well as being an attribute to be copied to the output is an xml:base attribute which affects the xml parsing of the stylesheet and "{$XML_BASE} isn't a valid URI, and even if it were, it isn't th ebase yu want to use (eg as base URI for any uses of document() ) safer to do <rdf:RDF> <xsl:attribute name="xml:base"><xsl:alue-of select="$XML_BASE"/></xsl;attribute> so it's added to the result without affecting the stylesheet. David ________________________________________________________________________ The Numerical Algorithms Group Ltd is a company registered in England and Wales with company number 1249803. The registered office is: Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom. This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. ________________________________________________________________________
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|