473,387 Members | 1,890 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

XSL Doctype with entities

Hello,

i've a xsl document that should also allow xhtml entities like  

The top of the document looks like this;

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE xsl:stylesheet [
<!ENTITY % xhtml PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
%xhtml;
]>

<xsl:stylesheet version="1.0" ...
But my editor can not find the dtd of xsl now, how should i include the dtd of xsl?
I think like this:
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE xsl:stylesheet PUBLIC "http://doctypeofxsl" [
<!ENTITY % xhtml PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
%xhtml;
]>

<xsl:stylesheet version="1.0" ...
Is that right? And then: what is the url of the dtd for xsl?? I cannot find it on w3c.org
Please help
Jul 20 '05 #1
3 5159


Tjerk Wolterink wrote:

i've a xsl document that should also allow xhtml entities like &nbsp;

The top of the document looks like this;

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE xsl:stylesheet [
<!ENTITY % xhtml PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
%xhtml;
]>

<xsl:stylesheet version="1.0" ...
But my editor can not find the dtd of xsl now, how should i include the
dtd of xsl? Is that right? And then: what is the url of the dtd for xsl?? I cannot
find it on w3c.org

Well think about, a DTD statically defines the grammar/structure of your
XML document while an XSLT stylesheet contains all sort of dynamic
content, namely the literal result elements and attributes that differ
from stylesheet to stylesheet so there can't be a DTD for XSLT as XSLT
allows you to include literal result elements of any kind.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 20 '05 #2
Martin Honnen wrote:


Tjerk Wolterink wrote:

i've a xsl document that should also allow xhtml entities like &nbsp;

The top of the document looks like this;

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE xsl:stylesheet [
<!ENTITY % xhtml PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
%xhtml;
]>

<xsl:stylesheet version="1.0" ...
But my editor can not find the dtd of xsl now, how should i include
the dtd of xsl?


Is that right? And then: what is the url of the dtd for xsl?? I cannot
find it on w3c.org


Well think about, a DTD statically defines the grammar/structure of your
XML document while an XSLT stylesheet contains all sort of dynamic
content, namely the literal result elements and attributes that differ
from stylesheet to stylesheet so there can't be a DTD for XSLT as XSLT
allows you to include literal result elements of any kind.


yes that's true, didnt think of that.

Well i solved my problem by now, is
it possible to write a xsd for xsl?
I do think is is possible.
Jul 20 '05 #3


Tjerk Wolterink wrote:

Well i solved my problem by now, is
it possible to write a xsd for xsl?
I do think is is possible.


W3C XML schemas allow you to specify that elements of any kind are
contained in another element and that validation for unknown elements is
skipped so using that feature it should be possible to write an XML
schema for XSLT.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Joshua Beall | last post by:
Hi All, I have been using the SAX library in PHP to parse XHTML documents, and one thing I have noted is that the <!DOCTYPE> line is ignored. I am wondering is there any way to get the...
0
by: BODIN | last post by:
I have an XML document, which is actually physically stored in 2 separated files. doc1.xml and doc2.xml I NEED a WAY FOR THIS SIMPLE NEED : XML file splitted into two physical files, and use...
13
by: Tjerk Wolterink | last post by:
Hello i've an xsl stylesheet that must support xhtml entities, my solution: ---- <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE xsl:stylesheet > <xsl:stylesheet version="1.0"...
5
by: Wladimir Borsov | last post by:
Assume I declare at the top of a HTML page: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> This refers to english HTML content/syntax. Later then I declare: <META...
2
by: __PPS__ | last post by:
Hello everybody, I use xerces for cpp and I'm tring to adapt domprint for my own needs. What I cannot find how to do is how can I preserve certain enteties. For example, if domprint run without...
3
by: bgeci | last post by:
I have problem with Entity definition. ____________________________________________ my file "test.xml" ---- <?xml version="1.0" ?> <!DOCTYPE message > <message>&Ep;</message> ---- IE6 Error...
1
by: Sakcee | last post by:
Hi I would really appreciate if soemone can point me to the direction. how can I use xml.sax to catch doctype entities. there is a xml.sax.DTDHandler , but how should i use it? thanks
29
by: AndyZa | last post by:
According to the w3c specs a web page is not valid if the DOCTYPE declaration is missing. So, if I add the following doctype to my pages they will be "compliant": <!DOCTYPE HTML PUBLIC...
3
by: xq386 | last post by:
Question: In the XSL file below I put a part of the code (concerning the euro-sign) in comment. If I remove the comment then it doesn't work anymore. How can this be solved? I run Test.html with...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
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...
0
Oralloy
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,...
0
jinu1996
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.