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

How to force prefixes instead of expanded qnames?

Subject: How to force prefixes instead of expanded qnames?
From: Maurice Mengel <mauricemengel@xxxxxxxxx>
Date: Tue, 17 Aug 2010 15:53:57 -0400
 How to force prefixes instead of expanded qnames?
Hi there!

I guess this must have come up before, but I can't find it.

I get this kind of a result which works fine, but is a bit more
difficult to read than necessary:

<Repository xmlns:oai="http://www.openarchives.org/OAI/2.0/"
            xmlns="http://www.openarchives.org/OAI/2.0/static-repository"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xmlns:mpx="http://www.mpx.org/mpx"
            xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/static-re
pository
   http://www.openarchives.org/OAI/2.0/static-repository.xsd">
...
B B  B  B  B  <oai:metadata>
B B  B  B  B  B  B <mpx:multimediaobjekt
xsi:schemaLocation="http://www.mpx.org/mpx
file:/c:/cygwin/home/Mengel/usr/levelup/lib/mpx-lvl2.v2.xsd"
B B  B  B  B  B  B  B  B  B  B  B  B  B  B  B  B 
B exportdatum="2010-04-19T16:39:14"
B B  B  B  B  B  B  B  B  B  B  B  B  B  B  B  B  B mulId="7216">
B B  B  B  B  B  B  B  <bearbDatum xmlns="http://www.mpx.org/mpx">12.12.2005
14:32:13</bearbDatum>
B B  B  B  B  B  B  B  <multimediaFarbe
xmlns="http://www.mpx.org/mpx">farbig</multimediaFarbe>
B B  B  B  B  B  B  B  <multimediaFormat xmlns="http://www.mpx.org/mpx">RF
(6x6 cm)</multimediaFormat>
...

I would prefer having the namespace written as a prefix like in
<mpx:multimediaobjekt>.

This is an xslt 2 transformation and I am using copy-of to create
those elements where I don't like the output.

Thanks!
Maurice

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.