xsl-list
[Top] [All Lists]

[xsl] Help please: question on xml's schema and xslt

2014-08-01 07:42:09
I have ask on many different forums; visionzone, sitepoint, oreilly, even ask 
an author of a book, but receive no reply. I have even try stackexchange. This 
doesn't make sense....

---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:

ITS NOT LETTING ME SHOW THE TAGS!!!! And I'm on mobile doing this.

<?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!



E-S4L
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--
<Prev in Thread] Current Thread [Next in Thread>