Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About pottmi

  • Rank
  1. Cool. Learned two cool things:I read about the anyAttribute, but I did not understand why I would want to use it ( I thought it was too liberal). now I know how I can use it.Also, the ref attribute. that makes more sense than the name/type combination that I was using.Here is my current problem, as an academic exercise, I am trying to limit the the attributes to href and type.Here is the schema I am using: <?xml version="1.0" ?><xs:schema xmlns:xs = "http://www.w3.org/2001/XMLSchema" xmlns:xlink="http://www.w3.org/2000/10/xlink-ns"> <xs:element name="person"> <xs:com
  2. Let me ask an explicite question:How do a modify this schema: <?xml version="1.0" ?><xs:schema xmlns:xs = "http://www.w3.org/2001/XMLSchema"> <xs:element name="person"> <xs:complexType> <xs:sequence> <xs:element name="homepage" type="homepage"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="homepage"> <xs:complexType> <xs:attribute name="xml:lang" /> </xs:complexType> </xs:element></xs:schema> Such that this xml is valid: <?xml version="1.0"?><person><homep
  3. I think what you are telling me that parsers do not have to enforce the xml: namespace being confined a limited number of keywords and that explains why xmllint allows xml:foobar to pass without an error.So what is wrong with my schema that it does not allow me to add an attribute xml:lang?I am sure it is something I am doing; I am relatively new to writing schemas.Mr. Potter
  4. I am trying to define a schema that includes xml:lang. I can add xml:lang to a dtd and it will pass xmllint, but I suspect I could add xml:foobar and it would pass xmllint.Please help me add xml:lang to both a dtd and schema. here is my test code:# pottmi@mikepb $ xmllint --schema myxmllang.xsd --noout myxmllang.xmlmyxmllang.xsd:14: element attribute: Schemas parser error : Attribute decl., attribute 'name' ['NCName']: The value 'xml:lang' is not valid.WXS schema myxmllang.xsd failed to compile# pottmi@mikepb $ xmllint --dtdvalid myxmllang.dtd --noout myxmllang.xml# pottmi@mikepb $ myxmllang
  5. I am trying to write a schema that contains an xlink. I was able to write a DTD successfully.Please tell me what I am doing wrong...myxlink.xml:<?xml version="1.0"?><person xmlns:xlink="http://www.w3.org/1999/xlink"><homepage'>http://www.w3.org/1999/xlink"><homepage xlink:href = "my.homepage.not" /></person>myxlink.dtd: <!ELEMENT homepage (#PCDATA)> <!ATTLIST homepage xlink:type (simple) #FIXED 'simple' xlink:href CDATA #REQUIRED> <!ELEMENT person (homepage)> <!ATTLIST person xmlns:xlink CDATA #FIXED "http
  • Create New...