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

Re: namespace prefix weirdness

Subject: Re: namespace prefix weirdness
From: Bruce D'Arcus <bdarcus@xxxxxxxxxxxxx>
Date: Wed, 18 Aug 2004 09:02:27 -0400
majic constructs sql
On Aug 18, 2004, at 8:35 AM, Michael Kay wrote:

So is this purely an aesthetic issue?  It has no effect on subsequent
processing?

The choice of namespace prefixes, unfortunately, is not completely
arbitrary, (a) because you might be using constructs that use namespace
prefixes in element or attribute content, and (b) because you might require
that the result document is valid against a DTD that disallows the presence
of certain xmlns:xxx attributes.

If there are then processing implications, it seems to me that with Jeni's simple stylesheet, Saxon ought to generate a perfectly clean copy the mods element (the default element for the stylesheet is defined), but it doesn't. IIRC, the mods element gets the weird prefix. That isn't a problem in this case, but seems like it could be.


--- mods.xsl ---
<xsl:stylesheet version="2.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:mods="http://www.loc.gov/mods/v3"
                xmlns="http://www.loc.gov/mods/v3">

<xsl:template match="mods:modsCollection" mode="enhanced-bib">
  <modsCollection>
    <xsl:apply-templates select="mods:mods"  mode="enhanced-bib"/>
  </modsCollection>
</xsl:template>

<xsl:template match="mods:mods" mode="enhanced-bib">
  <key>test</key>
  <xsl:copy-of select="."/>
</xsl:template>

</xsl:stylesheet>

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.