Click here to Skip to main content
15,939,853 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralRe: XML file read images and display them at random Pin
Richard MacCutchan12-Sep-19 11:33
mveRichard MacCutchan12-Sep-19 11:33 
QuestionQuery XML API and display results Pin
hm928-Aug-19 4:37
hm928-Aug-19 4:37 
AnswerRe: Query XML API and display results Pin
Richard MacCutchan28-Aug-19 5:57
mveRichard MacCutchan28-Aug-19 5:57 
QuestionDate conversion failure in xsl file (Chinese characters showing in date field) Pin
AkashBabu25-Feb-19 2:34
AkashBabu25-Feb-19 2:34 
AnswerRe: Date conversion failure in xsl file (Chinese characters showing in date field) Pin
Richard Deeming25-Feb-19 8:51
mveRichard Deeming25-Feb-19 8:51 
QuestionDeserializing of List Array appends instead of overwrite Pin
Wild Thing13-Jul-18 0:53
Wild Thing13-Jul-18 0:53 
QuestionHow do I change this code to store new values to data list Pin
DropItSweet9-Jun-18 23:26
DropItSweet9-Jun-18 23:26 
QuestionXML validation with libxml2 and msxml Pin
sandre14-May-18 21:49
sandre14-May-18 21:49 
Hello,


I need to validate an XML file using an XSD scheme imposed by a provider.

For that I use the library libxml2 version 2.9.4 and msxml6 under Windows and I get different results.

With libxml2 the XML file is not valid on Windows or Linux.
With MSXML6 the XML file is considered valid.

Below are some simplified examples. To easily validate the XML file with the XSD, I use Microsoft Visual Studio (msxml) and compare with Notepad ++ (XMLTools plugin that apparently uses libxml2).

XML file :
<?xml version="1.0" encoding="utf-8"?>
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:root="http://www.xmlValidation.com/root" xsi:schemaLocation="./schema_strict.xsd">
	<object identifier="1ABC001DE"/>
</root>


XSD file :
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
  <xs:complexType name="codeType">
    <xs:attribute name="identifier" use="required">
      <xs:simpleType>
        <xs:restriction base="xs:NMTOKEN">
          <xs:maxLength value="10"/>
          <xs:pattern value="\d\p{Lu}\p{Lu}\p{Lu}\d\d\d\p{Lu}\p{Lu}(\p{Lu}|\d|)"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
	<xs:element name="root">
		<xs:complexType>
			<xs:sequence>	
				<xs:element name="object" type="codeType" minOccurs="0">
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
</xs:schema>


By adding a "?" at the end of the control pattern, the validation is ok with libxml and msxml: \d\p{Lu}\p{Lu}\p{Lu}\d\d\d\p{Lu}\p{Lu}(\p{Lu}|\d|)?

Not at all comfortable with regular expressions and XSDs I need help on this topic.
Do you think that libxml is stricter than msxml? is the interpretation of the regular expression ambiguous?

Thank you very much !
AnswerRe: XML validation with libxml2 and msxml Pin
Jochen Arndt15-May-18 0:53
professionalJochen Arndt15-May-18 0:53 
QuestionXmlElements won't write on a new line. Pin
Stephen Holdorf23-Oct-17 7:56
Stephen Holdorf23-Oct-17 7:56 
AnswerRe: XmlElements won't write on a new line. Pin
Maciej Los10-Feb-18 2:08
mveMaciej Los10-Feb-18 2:08 
QuestionNeed help with API Values in XElement Pin
Bootzilla3322-Sep-17 3:56
Bootzilla3322-Sep-17 3:56 
AnswerRe: Need help with API Values in XElement Pin
George Jonsson23-Sep-17 2:15
professionalGeorge Jonsson23-Sep-17 2:15 
QuestionXSL to get only elements which have no childs Pin
MrKBA19-Sep-17 0:26
MrKBA19-Sep-17 0:26 
AnswerRe: XSL to get only elements which have no childs Pin
Richard Deeming19-Sep-17 2:15
mveRichard Deeming19-Sep-17 2:15 
GeneralRe: XSL to get only elements which have no childs Pin
MrKBA19-Sep-17 3:02
MrKBA19-Sep-17 3:02 
Questionshare me best practices to enhance xslt related functionality in production Pin
Member 1178590912-Jul-17 1:50
Member 1178590912-Jul-17 1:50 
AnswerRe: share me best practices to enhance xslt related functionality in production Pin
Richard MacCutchan12-Jul-17 3:58
mveRichard MacCutchan12-Jul-17 3:58 
GeneralRe: share me best practices to enhance xslt related functionality in production Pin
jschell1-Sep-17 12:24
jschell1-Sep-17 12:24 
GeneralRe: share me best practices to enhance xslt related functionality in production Pin
Richard MacCutchan1-Sep-17 21:42
mveRichard MacCutchan1-Sep-17 21:42 
QuestionTransform XML Pin
TML6-Jul-17 9:15
TML6-Jul-17 9:15 
AnswerRe: Transform XML Pin
Richard Deeming6-Jul-17 10:40
mveRichard Deeming6-Jul-17 10:40 
AnswerRe: Transform XML Pin
TML6-Jul-17 10:50
TML6-Jul-17 10:50 
Questionsaving a file to the internet. Pin
felixjrz198531-May-17 21:54
felixjrz198531-May-17 21:54 
SuggestionRe: saving a file to the internet. Pin
Richard MacCutchan31-May-17 22:32
mveRichard MacCutchan31-May-17 22:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.