w3c

restriction of elements based on another attribute using XSD 1.1

我只是一个虾纸丫 提交于 2019-12-06 09:48:56
问题 I am trying to create a schema definition using XSD 1.1 in which the number of other elements is dependent on the attribute of another element. E.g. The number of the BaPath elements BaPath depends on the value of the attribute "service" of the "Conn" element. The xsd I wrote is <?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:element name="Mapping"> <xsd:complexType> <xsd:sequence> <xsd:element ref="Link" minOccurs="0" maxOccurs="unbounded

What is the best method to code physical address in html?

假装没事ソ 提交于 2019-12-06 05:59:11
问题 What is the best method to code physical address in html ? in Semantic, Accessible and SEO way 回答1: Use a Microformats vCard <div class="vcard"> <span class="fn">Gregory Peck</span> <a class="org url" href="http://www.commerce.net/">CommerceNet</a> <div class="adr"> <span class="type">Work</span>: <div class="street-address">169 University Avenue</div> <span class="locality">Palo Alto</span>, <abbr class="region" title="California">CA</abbr> <span class="postal-code">94301</span> <div class=

Is there a 3D format which is a 3D extension to SVG?

依然范特西╮ 提交于 2019-12-06 05:35:37
问题 SVG is the W3C's standard for 2D vector graphics. Something quite solid. Is there a 3D version of SVG? A kind of extension of it, so converting from .SVG to .something and reverse is quite straight forward. 回答1: No, there is no such standard extension to SVG as part of the W3C. The closest that exists is the W3C Community Group, "Declarative 3D for the Web Architecture Community Group" . Editorial: nor should there be. While SVG is great and vector, it is a presentation format, not a data

Does a .NET library for the W3C Markup Validator API exist? [closed]

一曲冷凌霜 提交于 2019-12-06 05:09:05
Closed. This question is off-topic . It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I'd like to validate that users of my WPF application are putting proper XHTML into its TextBox control. I found that there's an API for the W3C Markup Validator . It's web page says: Building of libraries used to interact with the validator's API is encouraged. … and it lists known Perl, PHP/PEAR and ColdFusion libraries. Does anyone know of a .NET library for the W3C Markup Validator API? Does one already exist?

FILTER_VALIDATE vs Preg_match. Which one to use?

无人久伴 提交于 2019-12-06 04:42:46
问题 To validate input date, both form URL or from a form, which technique do you usually use? I have been looking at PHP Filters but i have rarely see them on any code. I have usually seen the use of preg_mach, for example: $numbers = "/^[0-9]+$/D"; if (preg_match($numbers, $var)){ echo "is number"; } Instead of: if(!filter_var($var, FILTER_VALIDATE_INT)) echo "is number"; } Is there any advantage using one or another? Thanks! 回答1: Php introduced the filer_ functionality for a wide range of types

traverse through each file in SD card using phonegap file api

两盒软妹~` 提交于 2019-12-06 02:39:57
I want to traverse through each file in the SD card inside all the directories and sub directories using the FILE API of phonegap (which is the w3c file api actually). I have to perform a certain set of operations on these files by looking at their nature. I donot want to search for specific types of files, but traverse through each file in a sequential manner. Can someone please help me with this? Just a basic loop framework with the necessary requirements for the traversal would be a great help. Thank You in advance. I think the following code should work: window.requestFileSystem

How to validate that HTML matches W3C standards

核能气质少年 提交于 2019-12-06 02:22:00
问题 I have a project that generates HTML pages using a Velocity template and Java. But most of the pages do not comply with W3C standards. How can I validate those HTML pages and get a log telling me what errors/warnings on what pages? Then I can fix the errors manually. I have tried JTidyFilter, but that doesn't work for me. 回答1: You can use the W3C validator directly from Java, see w3c-jabi. 回答2: There is also an experimental API available from W3C to help automate validation. They kindly ask

Can I combine local and remote dataset within SPARQL query?

a 夏天 提交于 2019-12-06 02:01:00
问题 I've been reading about SPARQL and RDF and please correct me if my reasoning about these technologies is wrong here. Assuming that we have a local SPARQL database called LOCAL.. and url to remote RDF file called URL_RDF. Can I write a script lets say in PHP which will do a SPARQL query like this ? Pseudo code. SELECT * FROM LOCAL,URL_RDF WHERE LOCAL.id=URL_RDF.id In other words can I combine sources within SPARQL query like this (remote file + local db) ? 回答1: You can do this using the

How to preserve newlines in CDATA when generating XML?

可紊 提交于 2019-12-06 01:48:11
问题 I want to write some text that contains whitespace characters such as newline and tab into an xml file so I use Element element = xmldoc.createElement("TestElement"); element.appendChild(xmldoc.createCDATASection(somestring)); but when I read this back in using Node vs = xmldoc.getElementsByTagName("TestElement").item(0); String x = vs.getFirstChild().getNodeValue(); I get a string that has no newlines anymore. When i look directly into the xml on disk, the newlines seem preserved. so the

Validate markup of password-protected sites with W3C

半城伤御伤魂 提交于 2019-12-06 00:52:55
问题 I have an online app that I am wanting to validate the HTML markup of against the W3C validator. Problem is users need to log in first to access them. How do I go about validating these pages? 回答1: With this html validator extension. Or by Ctrl-U, copy-paste into the w3c page. 回答2: You have to run the service they provide on your server: http://validator.w3.org/docs/install.html Thats what we've done, works great. I think it's best practice to be validating your sites source when it's in