B
Benjamin Kalytta
Hello,
I'm wondering if it is possible to include elements from other
namespaces in own xml files.
My Schema file looks like:
[...]
<xs:element name="string">
<xs:complexType mixed="true">
<xs:sequence minOccurs="0">
<xs:any namespace="http://www.w3.org/1999/xhtml"
processContents="strict" />
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
Corresponding xml could be:
[...]
<string id="xyz">This is a <html:strong>test</html:strong></string>
You see, what I want is first to allow such xml tags within xml file and
second transform it into corresponding <strong>.
If I use some XML DOM API like:
element = document.getElementbyId("xyz");
element should not contain of one textnode "This is a test" only, but it
should contain the text node "This is a", and one child element
"strong". Is this possible?
The document if loaded and validated would look like:
<string name="xyz">
This is a
<strong>
test
</strong>
</string>
Any Idea?
regards
Benjamin Kalytta
I'm wondering if it is possible to include elements from other
namespaces in own xml files.
My Schema file looks like:
[...]
<xs:element name="string">
<xs:complexType mixed="true">
<xs:sequence minOccurs="0">
<xs:any namespace="http://www.w3.org/1999/xhtml"
processContents="strict" />
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
Corresponding xml could be:
[...]
<string id="xyz">This is a <html:strong>test</html:strong></string>
You see, what I want is first to allow such xml tags within xml file and
second transform it into corresponding <strong>.
If I use some XML DOM API like:
element = document.getElementbyId("xyz");
element should not contain of one textnode "This is a test" only, but it
should contain the text node "This is a", and one child element
"strong". Is this possible?
The document if loaded and validated would look like:
<string name="xyz">
This is a
<strong>
test
</strong>
</string>
Any Idea?
regards
Benjamin Kalytta