xsl-list
[Top] [All Lists]

Trying to build a schema and add a namespace

2005-04-19 15:54:44
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




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--