Share via E-Mail
Share on Twitter
Share on Facebook
E-junkie Blog
E-junkie FaceBook Page
E-junkie @ Twitter

E-junkie Ecommerce Forums » E-junkie Discussions

Tag Cloud for this topic:

W3C XHTML and E-junkie



SoundMaven
member
Posts: 23


When I run my website through http://validator.w3.org, there are four (4) categories of e-junkie errors that repeatedly appear. How can these errors be fixed, so that my website's code is in compliance?

---> Error #1 XML Parsing Error: EntityRef: expecting ';'

Line 28, column > 80: XML Parsing Error: EntityRef: expecting ';'
…www.e-junkie.com/ecom/gb.php?c=cart&cl=11918&ejc=2" target="ej_ejc" onclick="…



---> Error #2 reference to external entity in attribute value

Line 28, column 81: reference to external entity in attribute value
…ww.e-junkie.com/ecom/gb.php?c=cart&cl=11918&ejc=2" target="ej_ejc" onclick="j

Line 28, column 81: reference to external entity in attribute value
…ww.e-junkie.com/ecom/gb.php?c=cart&cl=11918&ejc=2" target="ej_ejc" onclick="j
Line 28, column 91: reference to external entity in attribute value
…e.com/ecom/gb.php?c=cart&cl=11918&ejc=2" target="ej_ejc" onclick="javascript:



---> Error #3 reference not terminated by REFC delimiter

Line 28, column 81: reference not terminated by REFC delimiter
…ww.e-junkie.com/ecom/gb.php?c=cart&cl=11918&ejc=2" target="ej_ejc" onclick="j

Line 48, column 832: reference not terminated by REFC delimiter
…ef="index.php?option=com_content&view=article&id=59" title="Listen, shop and



---> Error #4 cannot generate system identifier for general entity X

Line 28, column 79: cannot generate system identifier for general entity "cl"
…/www.e-junkie.com/ecom/gb.php?c=cart&cl=11918&ejc=2" target="ej_ejc" onclick=
Line 28, column 88: cannot generate system identifier for general entity "ejc"
…nkie.com/ecom/gb.php?c=cart&cl=11918&ejc=2" target="ej_ejc" onclick="javascri

Thank you.


#
POSTED ON: June 22, 2008 @ 00:47 GMT -7
MODIFIED ON: March 26, 2009 @ 20:40 GMT -7




E-junkieChef
E-Junkie Crew
Posts: 936




#
POSTED ON: June 22, 2008 @ 17:41 GMT -7




SoundMaven
member
Posts: 23


First of all, the code that's generating this error is the code that is generated by e-junkie and is obtained at e-junkie's "get button code." Why hasn't this issue been addressed at the code generation level?

Secondly, that topic/79 post you referenced is not helpful.

The initial answer on topic/79 says:
1. Remove the target="..." part
2. Replace & with &
3. Add an alt='buy this' to the image tag

In a later reply it says:
Have you replace all occurence of & in the URL with & amp;

So which is it?

For the sake of simplicity, please take the following snippet of code that's generating the error, and show us what it SHOULD look like to resolve this W3C compliance issue:

<a href="https://www.e-junkie.com/ecom/gb.php?c=cart&i=63713&cl=11918&ejc=2" target="ej_ejc" class="ec_ejc_thkbx" onClick="javascript:return EJEJC_lc(this);">

Thank you.


#
POSTED ON: June 22, 2008 @ 21:16 GMT -7




E-junkieGuru
E-Junkie Crew
Posts: 4345


Your example should look something like this:

<a href="https://www.e-junkie.com/ecom/gb.php?c=cart& amp;i=63713& amp;cl=11918& amp;ejc=2" alt="Add to Cart" class="ec_ejc_thkbx" onclick="javascript:return EJEJC_lc(this);">

(Note that for demonstration purposes, I had to enter a [space] between the "&" and "amp;" which should be run together in practice -- without the [space]s I inserted, your browser would display it as a plain "&" without the "amp;" part being visible)

BTW, I presume you are using XHTML because it is being used within, or interoperating with, the larger scope of an XML data framework you have developed? Since I don't know your specific situation, consider the following as general advice (perhaps at least for the benefit of others playing along at home :^):

If you are not using XML, then there's really no reason to use XHTML, with all the pitfalls and tradeoffs that entails. XHTML is not the "latest standard" for HTML (that would be HTML 4.01), it's just a special modification of HTML that can be included within XML data records. XHTML is subject to the much stricter parsing validation of XML (where one syntax error could devastate the functioning of an entire dataset and any programming schema dependent on that data). If you don't know whether you're using XML or need to be compatible with it, then you definitely aren't and don't. :^)

Perfectly valid HTML will not validate as XML, so XHTML was invented to address that specific need for certain developers; some browsers will refuse to render an XHTML page at all if it's not perfect, whereas they're much more forgiving with "regular" HTML (which can also be optimized to load quicker with less code, whereas XHTML requires extra code bloat to complete the XML syntax and validate properly at all). FYI and FWIW, YMMV. ;^D


#
POSTED ON: June 23, 2008 @ 13:11 GMT -7
MODIFIED ON: March 26, 2009 @ 20:38 GMT -7




TexasButter
member
Posts: 14


Has this issue been fixed/addressed yet?

I need XHTML 1.0 strict for my data. I am getting about 40 errors and 40 warnings all from E-junkie
Here are a few

Line 208, Column 65: cannot generate system identifier for general entity "cl"
…unkie.com/ecom/gb.php?c=cart&i=569686&cl=90474&ejc=2" target="ej_ejc" class="

Error Line 208, Column 126: there is no attribute "onClick"
…"ej_ejc" class="ec_ejc_thkbx" onClick="javascript:return EJEJC_lc(this);"><a h…

Error Line 208, Column 320: document type does not allow element "a" here; missing one of "object", "span", "bdo", "applet", "iframe", "tt", "i", "b", "u", "s", "strike", "big", "small", "font", "em", "strong", "dfn", "code", "q", "samp", "kbd", "var", "cite", "abbr", "acronym", "sub", "sup", "label", "ins", "del" start-tag
…ck="javascript:return EJEJC_lc(this);"><a href="https://www.e-junkie.com/ecom/

Line 242, Column 76: reference to entity "ejc" for which no system identifier could be generated
<a href="https://www.e-junkiecom/ecom/gb.php?i=569686&c=gc&cl=90474&ejc=4">

Regards


#
POSTED ON: August 2, 2010 @ 02:43 GMT -7
MODIFIED ON: August 2, 2010 @ 02:45 GMT -7




E-junkieGuru
E-Junkie Crew
Posts: 4345


The button codes we provide are HTML 4.01 compliant and suitable for the vast majority of Web pages. If you are using XML in a way that presents a technical requirement for strict XHTML in your pages, then you must edit the button codes in your page to make them XHTML compliant. As we recommended above, change all instances of "&" in your button code to "&", and change all attribute names (such as onClick) to all-lowercase, so e.g. your basic Add to Cart button code would look like this:

<a href="https://www.e-junkie.com/ecom/gb.php?c=cart&i=569686&cl=90474&ejc=2" target="ej_ejc" class="ec_ejc_thkbx" onclick="javascript:return EJEJC_lc(this);"><img src="http://www.e-junkie.com/ej/ej_add_to_cart.gif" border="0" alt="Add to Cart"/></a>

The last two errors appear to concern button code that has become malformed somehow. If you could you provide the URL of your page which is generating these errors/warnings, we can have a look and see what got mangled there that you'd need to fix.


#
POSTED ON: August 2, 2010 @ 14:28 GMT -7




TexasButter
member
Posts: 14


So beyond fixing my own screw ups in my code I have to fix yours too?
I am not concerned about the vast majority of web pages only my own.
Doing this for the search engines, being up to date with them, SEO, RDFa...


#
POSTED ON: August 2, 2010 @ 18:06 GMT -7




E-junkieGuru
E-Junkie Crew
Posts: 4345


The button code we issue in Seller Admin is perfectly compliant with HTML 4.01, the current, active standard maintained and recommended by the W3C for Web documents formatted in HTML. If you want to rewrite our code to become compliant with a different standard, such as the special-case XHTML 1.0, that is your own responsibility.

If you paste our code into your own page where it then gets mangled somehow, your page's mangled version of our original, correct button code is also your responsibility. However, if you can provide us with the URL of your page, we'd be glad to take a look and help you figure out what got mangled and how to fix it. For instance, the button code we issue in Seller Admin would never contain this string from your validation error report:

…ck="javascript:return EJEJC_lc(this);"><a href="https://www.e-junkie.com/ecom/

...where it looks like you may have intermingled the code for two separate buttons into each other somehow -- nor this other string:

<a href="https://www.e-junkiecom/ecom/gb.php?i=569686&c=gc&cl=90474&ejc=4">

...where it appears the "." in "e-junkie.com" has been deleted, probably accidentally.


#
POSTED ON: August 2, 2010 @ 19:41 GMT -7
MODIFIED ON: August 2, 2010 @ 19:47 GMT -7




TexasButter
member
Posts: 14


You can quit trying to spin it. It is not me mangling it's EJ mangled already. I am well aware of what I have to fix due to my own sloppy build and mistakes which is mostly missing image tags from new images on the site.
I just read what WC3 had to say about HTML when it was popular in 1996. I build homes for a living and I am going to not have any "updated" wiring installed like fiber optics. When the customer ask why? I am going to tell them the vast majority of homes in the world don't have fiber optics installed. silly

If you want me to paste all your outdated codes I can, was trying to keep it short. I took the period out of dot com and the other code is a snip of where WC3 found many problems. If your would like I could load all you codes by themselves and give you URL so you can see for yourself on WC3.

Anyway I have fixed all the problems with the codes (more than what's mentioned above) except for one below.

From WC3 test:
Line 17, Column 18: there is no attribute "language"

<script language="javascript" type="text/javascript"> (The first quote is highlighted)

The Full Tag:
<script language="javascript" type="text/javascript">
<!--
function EJEJC_lc(th) { return false; }
// -->
</script>

Any way to fix this?
Regards


#
POSTED ON: August 3, 2010 @ 03:50 GMT -7




E-junkieGuru
E-Junkie Crew
Posts: 4345


Apparently the language= attribute has been deprecated in favor of type=, but we include it anyway to retain compatibility with older browsers that may only understand language= and not type=. If this causes a problem for your XHTML implentation, you can just remove it, e.g.:

<script type="text/javascript">
<!--
function EJEJC_lc(th) { return false; }
// -->
</script>

Regarding the W3C, the HTML 4.01 standard finalized in 1999 is still the current, active standard and hardly "outdated". XHTML was never intended to replace or supersede HTML 4.01; indeed, the W3C is currently working on the HTML 5.0 standard that will in fact supersede the current HTML 4.01.

XHTML was only published as a special-case specification for XML programmers who wanted a version of HTML that would also validate as pure XML because they had a programmatic requirement to intermingle their HTML with XML, have HTML written by XML generators and read by XML parsers, etc. Anyone who is not explicitly using XML, and specifically in this intermingled manner, would have no need to use XHTML and should probably use HTML 4.01 instead.


#
POSTED ON: August 3, 2010 @ 15:44 GMT -7


You must be logged in to make a post. Please click here to login.

30 Day Money Back Guarantee
PayPal Certified Integration
Google Checkout Certified Integration
Slam the Online Scam