O'Reilly Forums: Question On Xml And The Likes - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Question On Xml And The Likes Post that I post in other forums, but received no answer for.

#1 User is offline   L2L2L 

  • New Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 28-July 14

Posted 28 July 2014 - 10:34 AM

---question 1------

what is apply-template?

Is it use to call a template element by matching the match attribute context node with it's select attribute context node. Is this true? if so, does the path to the node matter when matching both attribute up(most the xPath syntax be the same for both attribute for the apply-template to be able to call that particular template)? And is this the only way to use apply-template element(can it not stand alone to match a particular node context by absolute path in the target or link to xml document)?

----question 2-------

Is this legal:
<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlnss="http://www.w3.org/2001/XMLSchema">

<xs:annotation>
<xs:documentation>
I'm warping a name simpleType name nameType in an element that have the attribute type with the value of nameType. Is this legal; to warp a name type as so:
</xs:documentation>
</xs:annotation>
<xs:element name="name" type="nameType">
<xs:simpleType name="nameType">
<xs:restriction base="xs:string">
<xs:length value="25"/>
</xs:restriction>
</xs:simplyType>
</xs:element>
</xs:schema>


-----question 3--------

What are extension and restriction type?

----question 4---------

First question:

Can I place an extension on a restriction type?

And if so, how? Via what method? Directly? Via reference? Both?

And if so for both, what other ways?

Second question:

targetNameSpace is to set a name space for the xml element in my schema? yes or no then an explanation comment please.

a xmlnssi="uri" is to set the prefix for the xsi namespace and a
xsi:noNamespaceSchemaLocation="uri" is to set the location of my schema? yes or no, then a feedback comment please.

is the targetNameSapce needed... I find it non-necessary to do when it can(by what I'm reading) define top level element and complex type(another question is that by definning type level complex type, do that also mean that type level complex when use in a element that is nested in another element gain the namespace too?). I find it unnecessary to use targetNameSapce when it doesn't cover all element being defined in the schema.

informational feedback please anyone!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users