I'm sure this is an obvious question...
I have an XSL stylesheet, which looks like this:
<xs:element name="person">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="biography" type="xs:string"/>
I want to use the "name" element as also the ID for the "person" element, so that I can use .getElementByID in DOM. I have tried changing the "name" tag to:
<xs:element name="name" type="xs:ID"/>
but I get this error when validating an xml document that uses this stylesheet:
'John Smith' is not a valid value for 'NCName'.
I'm sure this is simple! Any help would be greatly appreciated
I have an XSL stylesheet, which looks like this:
<xs:element name="person">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="biography" type="xs:string"/>
I want to use the "name" element as also the ID for the "person" element, so that I can use .getElementByID in DOM. I have tried changing the "name" tag to:
<xs:element name="name" type="xs:ID"/>
but I get this error when validating an xml document that uses this stylesheet:
'John Smith' is not a valid value for 'NCName'.
I'm sure this is simple! Any help would be greatly appreciated