I have a DTD. If I declare it at the top of my XML file, as so:
<!DOCTYPE application PUBLIC "-//CYGNETS//DTD ADL 0.1//EN"
"http://libs.cygnets.co .uk/adl/unstable/ADL/schemas/adl-0.dtd">
then editors such as emacs (PSGML), Oxygen and Microsoft Visual Studio
parse the DTD and offer me context sensitive menus to insert the right
elements and the right attributes in the right places. So the DTD
really is there and really can be parsed. The top-level element in my
document structure is the element 'application', which is declared as
follows:
<!--
the application that the document describes: required top level
element
name: the name of this application
version: the version number of this application
revision: the revision of the ADL document
xmlns: XML namespace, in case required
-->
<!ELEMENT application ( specification?, documentation?, content?,
typedef*, group*, entity*)>
<!ATTLIST application
name CDATA #REQUIRED
version CDATA #IMPLIED
revision CDATA #IMPLIED
xmlns CDATA #IMPLIED>
So, everything's fine, you'd think. No problem.
But when I try to transform my document using XSLT, I get:
C:\Projects\ESA-McIntosh-CADLink\ESA-McIntosh-CADLink.build(7 4,4):
Could not perform XSLT transformation of 'C:\Projects\ES A-McIntosh-
CADLink\ESATool \ESA-McIntosh-CADLink.adl.xml ' using stylesheet
'file:///L:/adl/unstable/ADL//transforms/adl2canonical.x slt'.
The 'application' element is not declared.
If I remove - or comment out - the DTD declaration line the transform
works perfectly.
This is not a bug in some particular XSL engine, because MSXSL and
Xalan behave identically (except for the exact text of the error
message). So clearly I've got something wrong. But - what is it? 8 3697
Simon Brooke wrote:
I have a DTD. If I declare it at the top of my XML file, as so:
<!DOCTYPE application PUBLIC "-//CYGNETS//DTD ADL 0.1//EN"
"http://libs.cygnets.co .uk/adl/unstable/ADL/schemas/adl-0.dtd">
When I try to load http://libs.cygnets.co.uk/adl/unstab...emas/adl-0.dtd with
Firefox then all I get is a document saying "Virtual host not found on
this server".
--
Martin Honnen http://JavaScript.FAQTs.com/
In article <48************ ***********@new sspool1.arcor-online.net>,
Martin Honnen <Ma***********@ gmx.dewrote:
>I have a DTD. If I declare it at the top of my XML file, as so:
<!DOCTYPE application PUBLIC "-//CYGNETS//DTD ADL 0.1//EN" "http://libs.cygnets.co .uk/adl/unstable/ADL/schemas/adl-0.dtd">
>When I try to load http://libs.cygnets.co.uk/adl/unstab...emas/adl-0.dtd with Firefox then all I get is a document saying "Virtual host not found on this server".
Perhaps Simon is using a catalog to resolve the public ID?
Simon: can you post a (small) complete XML document that exhibits
the problem, and ensure that the DTD is at a working URL?
-- Richard
--
Please remember to mention me / in tapes you leave behind.
On Aug 7, 1:24*pm, Martin Honnen <mahotr...@yaho o.dewrote:
Simon Brooke wrote:
I have a DTD. If I declare it at the top of my XML file, as so:
<!DOCTYPE application PUBLIC "-//CYGNETS//DTD ADL 0.1//EN"
"http://libs.cygnets.co .uk/adl/unstable/ADL/schemas/adl-0.dtd">
When I try to loadhttp://libs.cygnets.co .uk/adl/unstable/ADL/schemas/adl-0.dtdwith
Firefox then all I get is a document saying "Virtual host not found on
this server".
Yes, sorry - not visible outside the firewall (intentionally) .
On Aug 7, 2:25*pm, rich...@cogsci. ed.ac.uk (Richard Tobin) wrote:
In article <489ae963$0$117 40$9b4e6...@new sspool1.arcor-online.net>,
Martin Honnen *<Martin.Hon... @gmx.dewrote:
I have a DTD. If I declare it at the top of my XML file, as so:
<!DOCTYPE application PUBLIC "-//CYGNETS//DTD ADL 0.1//EN"
"http://libs.cygnets.co .uk/adl/unstable/ADL/schemas/adl-0.dtd">
When I try to load http://libs.cygnets.co.uk/adl/unstab.../adl-0.dtdwith
Firefox then all I get is a document saying "Virtual host not found on
this server".
Perhaps Simon is using a catalog to resolve the public ID?
Simon: can you post a (small) complete XML document that exhibits
the problem, and ensure that the DTD is at a working URL?
Yes - that would obviously be sensible!
<URL:http://www.jasmine.org .uk/~simon/tmp/testapp.adl.xml >
It should be possible to transform it with this XSLT:
<URL:http://www.jasmine.org .uk/~simon/tmp/adl2canonical.x slt>
In article <1e************ *************** *******@i76g200 0hsf.googlegrou ps.com>,
Simon Brooke <st******@googl email.comwrote:
><URL:http://www.jasmine.org .uk/~simon/tmp/testapp.adl.xml >
It should be possible to transform it with this XSLT:
<URL:http://www.jasmine.org .uk/~simon/tmp/adl2canonical.x slt>
No problem with the file when running lxt or saxon, but your XSLT has
at least one error: the template for adl:application outputs a
comment, then calls <xsl:apply-templates select="@* | node()"/which
results in attributes being copied too late.
-- Richard
--
Please remember to mention me / in tapes you leave behind.
Simon Brooke wrote:
<URL:http://www.jasmine.org .uk/~simon/tmp/testapp.adl.xml >
It should be possible to transform it with this XSLT:
<URL:http://www.jasmine.org .uk/~simon/tmp/adl2canonical.x slt>
Which version of MSXML are you using?
Transformation seems to work fine when using MSXML 3, 4 or 5, only MSXML
6 when you try to validate the XML input document against the DTD
complains: "The element 'application' is used but not declared in the
DTD/Schema.". I am currently not sure why that happens but if you don't
need validation and simply want to load the XML to transform it you can
always switch validation off by setting
document.valida teOnParse = false
on the MSXML2.DOMDocum ent.6.0 you use to load the XML input.
--
Martin Honnen http://JavaScript.FAQTs.com/
Simon Brooke wrote:
<URL:http://www.jasmine.org .uk/~simon/tmp/testapp.adl.xml >
It should be possible to transform it with this XSLT:
<URL:http://www.jasmine.org .uk/~simon/tmp/adl2canonical.x slt>
I have no problems applying the stylesheet with Xalan Java. Saxon 6.5.5
complains about the problem already raised:
"Error at xsl:copy on line 348 of http://www.jasmine.org.uk/~simon/tmp...anonical.xslt:
Cannot write an attribute when there is no open start tag
Transformation failed: Run-time errors were reported"
Both Xalan and Saxon were run with Sun Java 1.5.
--
Martin Honnen http://JavaScript.FAQTs.com/
In article <48************ ***********@new sspool1.arcor-online.net>,
Martin Honnen <Ma***********@ gmx.dewrote:
>Which version of MSXML are you using?
Didn't there use to be a problem with Microsoft's parser requiring
xmlns attribute declarations to be #FIXED when validating? Or
something like that...
-- Richard
--
Please remember to mention me / in tapes you leave behind. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Skybuck Flying |
last post by:
Sometime ago on the comp.lang.c, I saw a teacher's post asking why C
compilers produce so many error messages as soon as a closing bracket is
missing. The response was simply because the compiler can't tell where a
bracket is missing.... a few weeks have past, I requested a feature for the
delphi ide/editor "automatic identation of code in...
|
by: intrepid_dw |
last post by:
Hello, all.
I've created a C# dll that contains, among other things, two functions
dealing with byte arrays. The first is a function that returns a byte
array, and the other is intended to receive a byte array as one of its
parameters. The project is marked for COM interop, and that all
proceeds normally.
When I reference the type...
|
by: Legendary Pansy |
last post by:
Hello, I'm trying to accomplish the impossible by trying to do something equivalent of this example found here
http://www.c-sharpcorner.com/Code/2003/Dec/DialogTutorial.as
Starting with "Listing 2 - Changing the constructor of the modeless dialog to accept the parent object:" line and go onwards is what I'm trying to do
Basically, there is...
|
by: Prasad |
last post by:
HI,
I am a beginner in VC++..
I am trying to write a Win32 console application in visual studio..
I am using following header files..
#include <STRING>
using namespace std;
#include <hash_map>//from Standard template library
//and some other headers
|
by: Tio |
last post by:
I have project in MFC(vc++) . There are files and classes:
classes:dialog1,dialog2,aaa,bbb
----------------------
main.cpp
---------------------
#include "mainfrm.h"
#include "dialog1.h"
#include "dialog2.h"
| |
by: shreshth.luthra |
last post by:
Hi All,
I am having a GUI which accepts a Unicode string and searches a given
set of xml files for that string.
Now, i have 2 XML files both of them saved in UTF-8 format, having
characters of different language.
Although both of them are having UTF-8 as BoM, but only first file is
having UTF-8 defined in XML declration at the top of...
|
by: arnuld |
last post by:
i have slightly modified the programme from section 1.5.1 which takes
the input frm keyboard and then prints that to the terminal. it just
does not run and i am unable to understand the error message.
may you tell me what is wrong and how to make that right ?
------------------------------ INPUT ---------------------
#include <stdio.h>
...
|
by: bndifek |
last post by:
Hi
I have a problem with raw socket. I want send SYN packet but I have a problem with checksum. When I send the packet to second komputer I see it in ethereal on the second computer( on the close port), but it shows that the packet has Incorect checksum. And the second komputer don't send packet to my kmoputer ( I have no reply ACK).I build...
|
by: anand1603 |
last post by:
hi,
Following is problematic Code
main()
{
char *ptr={NULL};
ftn(ptr);
}
|
by: =?iso-8859-1?q?|-|e|=5F|=5F_B0=DD?= |
last post by:
hi all!
I got a problem. I declared a SOCKET var in my C program but when i
compiled the program it displayed like
*--------------------------------------------------------------*
*'SOCKET': illegal use of this type as an expression *
* C:\..\..\..\include\winsock2.h: see declaration of 'SOCKET' *...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |