[xsl] Xalan: local namespace declaration and XSL transformation problem

Subject: [xsl] Xalan: local namespace declaration and XSL transformation problem
From: "Matthias O. Will" <m.o.will@xxxxxx>
Date: Tue, 03 Apr 2001 18:52:36 +0200
Hi,

I am converting XML to XML. My target DTD includes a local namespace,
which is declared in a separate DTD. When running Xalan, I get lots of
scrambled output, but I don't know where to start looking for remedy.

This is going to be long, and I'm starting by explaining what my target
DTD looks like:

<!ENTITY % dlmeta SYSTEM "http://www.dlmeta.de/dlmeta/2000/DLmeta.dtd";>
%dlmeta;
<!ENTITY % AriadneInclude SYSTEM
"http://www.informatik.uni-freiburg.de/~will/Ariadne/ariadne_local.dtd";>
%AriadneInclude;

The first DTD includes some entities, which are specified in a separate
file (and included in DLmeta.dtd), such as

<!ENTITY % a.Language '
        Scheme          (ISO639-2)              #REQUIRED
        LanguageName       (...)		#REQUIRED'>


The (...) stands for an explicit list of three-letter language
abbreviations according to ISO 639-2, which I have not expanded here.

Second, one element, say Viror:InteractivityLevel, has an attribute list
defined as 

	<!ATTLIST Viror:InteractivityLevel   %a.Language;>

(other local elements have the same attribute list, too). My target DTD
has an element 'Local' defined as ANY, and this is where the local
namespace fields go, starting with <Viror:Local>, which is the head of
everything else:

	<!ELEMENT Viror:Local (Viror:Pedagogical, Viror:Technical)>

Third, I am associating an URL with the namespace in the XSL stylesheet
so it appears in my output documents when running the interpreter:

	 <Viror:Local xmlns:Viror="http://www.dlmeta.de/local/2000/bsz";>

What is the consequence of doing this? What kind of document/object does
this URL have to reference?

Now, the problem when running Xalan is that I get the following error
messages

Line #317, Column #41: template match='DidacticalContext' 
Illegal attribute name: Scheme
Illegal attribute name: LanguageName
Line #325, Column #35: template match='CourseLevel' 
Illegal attribute name: Scheme
Illegal attribute name: LanguageName
Line #333, Column #39: template match='DifficultyLevel' 
Illegal attribute name: Scheme
Illegal attribute name: LanguageName
Line #341, Column #42: template match='InteractivityLevel' 
Illegal attribute name: Scheme
Illegal attribute name: LanguageName
Line #349, Column #39: template match='SemanticDensity' 
Illegal attribute name: Scheme
Illegal attribute name: LanguageName
Line #364, Column #38: template match='DocumentHandle' 
Line #370, Column #38: template match='FileMediaTypes' 
Illegal attribute name: Scheme
Line #370, Column #38: template match='FileMediaTypes' 
Illegal attribute name: Scheme
Line #370, Column #38: template match='FileMediaTypes' 
Illegal attribute name: Scheme
Line #370, Column #38: template match='FileMediaTypes' 
Illegal attribute name: Scheme
Line #377, Column #39: template match='OperatingSystem' 
Line #385, Column #49: template match='OtherPlatformRequirements' 
Illegal attribute name: Scheme
Illegal attribute name: LanguageName
Illegal attribute name: Scheme
Illegal attribute name: LanguageName
Line #398, Column #43: template match='InstallationRemarks' 
Illegal attribute name: Scheme
Illegal attribute name: LanguageName

When I declare the namespace in my XSL stylesheet as

	<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0"
                xmlns:Viror="http://www.dlmeta.de/local/2000/bsz";>

my output says

	<DLmeta xmlns:Viror="http://www.dlmeta.de/local/2000/bsz";>

and my output is ok. How do I achieve that xmlns:Viror is associated
with my <Local> element instead of <DLmeta>?

Do I need to declare my namespace (Viror) in the local DTD? If yes, how
do I do it? 

Thanks for your help and best regards,
Matthias O. Will

-- 

---------------------------------------------------------------------
PLEASE NOTE THAT MY MAIL ADDRESS m.o.will@xxxxxx WILL BE DISCONTINUED
AND USE m.o.will@xxxxxx TO SEND ME YOUR E-MAILS! THANK YOU VERY MUCH!
--------------------------------------------------------------------

Matthias O. Will (m.o.will@xxxxxx)                       <>< 
Institute of Computer Science,       University of Freiburg
Georges-Koehler-Allee, Bldg. 51, D-79110 Freiburg,  Germany	 
Phone:   +49-761-203-8170             Fax: +49-761-203-8162  
URL:     http://ad.informatik.uni-freiburg.de/~will

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread