Re: [xsl] Adding targetNamespace to schema

Subject: Re: [xsl] Adding targetNamespace to schema
From: "Georg Hohmann" <georg.hohmann@xxxxxxxxx>
Date: Mon, 22 May 2006 15:57:03 +0200

ok, that was the deal and my question was *really* a dump question.
Sorry for that. Sometimes i got messed up with all those tags and
attributes and stuff ... :-)

Many thanks,
G. Hohmann

2006/5/22, George Cristian Bina <george@xxxxxxxxxxxxx>:

There is nothing special with the targetNamespace attribute, you should
add it as you add any other attribute, for instance:

<xsl:template match="/">
   <xs:schema targetNamespace="myTargetNamespace" ...


or using xsl:attrinute

<xsl:template match="/">
   <xs:schema ...>

You have to pay attention when you make references to components from
this schema as those should be qualified names thus their names should
resolve to the correct namespace (target namespace) in the context they
are written in.

Best Regards,
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger

Georg Hohmann wrote: > Hello, > > i'm new to this list and i apologize in advance if my questions has > been covered a hundred times before. But for the lack of a search > function for the list (or was i too blind to find it?) it's not very > easy for a newbie to check this. > > I want to generate a schema out of a normal xml-file. The source > document has a different namespace as the xml files for which the > resulting schema should be suitable for. Most of the conversion (with > Saxon8) works fine, but i simply don't now how to add the > "targetNamespace"-attribute to the "xs:schema"-root tag of the result > document using XSLT. > > So i would be thankful if someone could give me a hint how to solve this. > > Regards, > G. Hohmann

Current Thread