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

Trying to build a schema and add a namespace

Subject: Trying to build a schema and add a namespace
From: Dan Vint <dvint@xxxxxxxxx>
Date: Tue, 19 Apr 2005 15:54:44 -0700
xsd import namespace
I've got a setup where I have an XML file that contains information that I use to generate a variety of schemas. This process works fine until I need to add an import statement to the schema and the related namespace declaration.

My source file has a list of the target namespace and the files to import with their information and I'm able to process that at the right spot (I can create a message that kicks out the values I would like to have in the schema.) Here is what I'm trying to generate:

<xsd:schema
	xmlns:xsd="w3c url"
	xmlns="ACORD default URL"
          xmlns:acord-doc="ACORD doc URL"
          xmlns:xml="W3C url for XML namespace - need for xml:lang use"
	xmlns:jag="ACORD JAG URL"
	targetnamespace="ACORD default URL">
<xsd:import namespace="ACORD DOC URL"/>
<xsd:import namespace="W3C url for XML namespace - need for xml:lang use"/>
<xsd:import namespace="ACORD JAG URL"/>

I have one for-each loop before the IMPORT statements that can create the namespace declarations and another for-each loop that outputs the import statments.

The import statements are perfect but I can't come up with any way to get the namespace on the schema element as well as use the prefix that I want. If I hard code this information on the stylesheet attribute I get what I need, but I need some way to read this from the file I'm processing or worst case pass it in on the commandline.

Any ideas how I can do this and avoid hard coding the values in the stylesheet?

..dan
---------------------------------------------------------------------------
Danny Vint

Specializing in Panoramic Images of California and the West
http://www.dvint.com

voice: 510-522-4703

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.